Site icon Cody Paste

How to Hide/remove/disable Add to cart button in woocommerce ?

 

So, to remove add to cart button from product detail page and shop page i.e. product listing page all we need to do is to add these two hooks.

We can place this code in any place where it should be appropriate.

In some cases, we can add them to functions.php file but in some cases it may generate some error. So, I’m going to place these hooks in woocommerce.php file under the plugins folder.

To access this file go to wordpress > wp-content > plugins > woocommerce and open the file woocommerce.php there and after line 904 place these two hooks.

Save the file then refresh page. Add to cart buttons should have been removed from the site.

[Source: http://www.themelocation.com/how-to-hideremovedisable-add-to-cart-button-in-woocommerce/]

Exit mobile version