WooCommerce remove add to cart
Today we talk about WooCommerce remove to add to cart to different places. Like listing page, product page. So let’s start with an example.
Lisitng Page
You have to remove the following action to do the trick.
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart');
Product Page
You have to remove the following action to do the trick.
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart');
For the simple product use the following code.
remove_action( 'woocommerce_simple_add_to_cart', 'woocommerce_simple_add_to_cart', 30 );
Remove add to cart for variable products without removing the variation selectors
Note: It will remove only the add to cart button and the Quantity box.
remove_action( 'woocommerce_single_variation', 'woocommerce_single_variation_add_to_cart_button', 20 );