The WPFolks app is out on iPhone and Android. Free, no ads. Download on the App Store Get it on Google Play
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

33 views
1 upvote
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

Proudly supported by