How to add content before add to cart button on single product page in Woocommerce?

In this tutorial we’ll learn how to add content after short description and before add to cart button on single product page in Woocomemrce.

Fortunately, we don’t need to change any of the default templates to achieve this, we can achieve this simply by using Woocommerce’s filters.

Here is the default product screen:


Now, we need to add content before add to cart button.

To do this add the following lines of code at the end of your theme’s functions.php file:

function my_content( $content ) {

                $content .= '<div class="custom_content">Custom content!</div>';

   return $content;



add_filter('woocommerce_short_description', 'my_content', 10, 2);

Replace the content you want to place with the bogus content.

You can access functions.php file here:


After updating the file, refresh the product page and you’ll see desired content being added:



Editorial Staff

ThemeLocation Provides Wordpress & Woocommerce development & Customization services. Have a Project? Contact To discuss

Leave a Reply

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