Archived topic
woocommerce remove "add to cart" button for product page
4 replies · Started by John Dowling on March 25, 2018
I'm going crazy trying to remove the "add to Cart" button from the single product page. I've searched all over internet and the solution seems to be to add
add_filter( 'woocommerce_is_purchasable', false );
to the theme's functions.php
But that crashed the page.
Can you help? At this point I'd even be happy just tohide it with CSS
Thanks
John
Ok. I got it to work by commenting out the entire add to cart loop in pluging files
templates/single-product/add-to-cart/simple.php
But that was sort of the nuclear option. Could you let me know how to use css to just hide it?
Give this a shot instead:
add_filter( 'woocommerce_is_purchasable', '__return_false' );
Worked great!
Thanks!!!
You're welcome :)