Answers for "remove add to cart woocommerce button"

4

woocommerce remove add to cart

// functions.php
add_filter( 'woocommerce_loop_add_to_cart_link', '__return_false' );
Posted by: Guest on June-16-2020
1

remove add to cart woocommerce button

function chiefthemes_remove_addcart() {
   $product = get_product();
   if ( has_term ( 'category-name', 'product_cat') ) {
       remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart' );
       remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );
       remove_action( 'woocommerce_simple_add_to_cart', 'woocommerce_simple_add_to_cart', 30 );
       remove_action( 'woocommerce_grouped_add_to_cart', 'woocommerce_grouped_add_to_cart', 30 );
       remove_action( 'woocommerce_variable_add_to_cart', 'woocommerce_variable_add_to_cart', 30 );
       remove_action( 'woocommerce_external_add_to_cart', 'woocommerce_external_add_to_cart', 30 );
   }
}
add_action( 'wp', 'chiefthemes_remove_addcart' );
Posted by: Guest on January-05-2021
0

remove add to cart woocommerce button

remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart');
Posted by: Guest on January-05-2021
0

woocommerce archive products button hide

remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart' );
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );
Posted by: Guest on August-04-2020
0

remove add to cart woocommerce button

//remove add cart button from single product page
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );

//remove add cart button from Shop page
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart');
Posted by: Hamza Afridi on November-22-2023

Code answers related to "remove add to cart woocommerce button"

Browse Popular Code Answers by Language