I’m trying to remove add to cart button from WooCommerce everywhere and leave it only in single product page
I have made a lot of research and I tried this code but it doesn’t work
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );
i want users can only add a product to cart in each single product page
2
Answers
if your code doesn’t work with the hook then you can do hide by css as well
Add the follows code snippet in your active theme’s functions.php to do that –