Skip to main content
Login Join
Snippet · PHP

Display Custom Message After Add to Cart Button in WooCommerce

Shared by Amit Dholiya · July 14, 2026 · @woocommerce_after_add_to_cart_button

6 views
Back to Snippets

Steps

  1. Open functions.php.
  2. Add the code below.
  3. Save the file.

Done — a custom message will appear below the Add to Cart button.

function add_custom_product_message() {
    echo '<p class="custom-message">Free Shipping Available</p>';
}

add_action(
    'woocommerce_after_add_to_cart_button',
    'add_custom_product_message'
);
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