Skip to main content
Login Join
Snippet · PHP

Add a Custom Message After the WooCommerce Cart Total

Shared by Amit Dholiya · August 19, 2026 · @woocommerce_after_cart_totals

5 views
Back to Snippets

You can display an important message directly below the cart totals, such as delivery information, payment details, or a promotional offer.

Steps

  1. Open your theme’s functions.php file.
  2. Add the code below.
  3. Save the file.
  4. Open your WooCommerce Cart page.

Done — your custom message will appear below the cart totals.

function add_message_after_cart_totals() {
    echo '<p class="custom-cart-message">
        🔒 Secure payment available on all orders.
    </p>';
}

add_action(
    'woocommerce_after_cart_totals',
    'add_message_after_cart_totals'
);
Know a different way to do this? Add your approach as a variation so folks can compare them side by side.
Submit a variation

0 comments