WooCommerce – Add Custom Content After ‘Add To Cart’ Button On Product Page

Not all eCommerce website are same with standard product headline, summary text, display image and then add to cart button. Even though it makes buying process simpler for the customers but not all eCommerce website are setup that way. If you have a WooCommerce setup and you are searching for how to add html text content, tab, additional button, image or any other content type after add to cart button on single product page, then this tutorial will guide you in the right direction.

Please take a look at the image below to understand what we are trying to achieve with this workaround:

WooCommerce Content Below Add To Cart

There is not much code editing work required to add content below the add to cart button on single product page. All you have to do is to add the code we have provided below in your theme’s functions.php file and save. You can paste this code at the very bottom of the functions file.

add_action( 'woocommerce_after_add_to_cart_button', 'content_after_addtocart_button' );

function content_after_addtocart_button() {
echo '<div class="content-section">Add Your HTML, Text Or Image Content Here!</div>';

You can replace “Add Your HTML, Text Or Image Content Here!” with your on text, image or other HTMl content to display whatever you want below add to cart button.

One Comment

  1. Hello,

    This works for me but theres no space between the text and the add to cart button. How do you change that ?

    Thank you,

Leave a Reply

Your email address will not be published. Required fields are marked *