Hide “Add to cart” Button When Product Price is Zero

Hi friends, Yesterday I got the tutorial request from my blog reader about WooCommerce code hacks to hide Add to cart button when the product price is zero.

For the better understanding here is the complete question “How to hide “Add to cart” button when the product price is Zero”.


Open functions.php file from current activated theme folder and add the bellow code at the end of the file and save it. It will automatically hide the Add to Cart button for all products which price is zero or not entered during product creation time.

Over to You

Do you like & share this article with your friends, and don’t forget to follow us on Facebook and Twitter to learn cool WordPress tutorials.

If you like FreeWebMentor and you would like to contribute, you can write an article and mail your article to [email protected] Your article will appear on the FreeWebMentor main page and help other developers.

Recommended Posts:

Article Tags: , , , , , , , ,