Remove add to cart button (NOT CSS)
-
Hello!
How can i remove add to cart from product archive?
I used this hook
remove_action( ‘woocommerce_after_shop_loop_item’, ‘woocommerce_template_loop_add_to_cart’);
but no effect.
Thank you so much!
Hello,
Enter the code below into the fucntions.php file in your child theme to remove the “add to cart” button.
if ( ! function_exists( 'wd_remove_add_to_cart_button' ) ) {
function wd_remove_add_to_cart_button() {
remove_action( 'woodmart_add_loop_btn', 'woocommerce_template_loop_add_to_cart', 10 );
}
add_action( 'wp', 'wd_remove_add_to_cart_button', 240 );
}
In the meantime, feel free to ask me any questions you may have.
Kind Regards
It’s working. Thank you so much!
Hello,
You are welcome! If you do not mind, can you please leave a 5 stars rating for our theme by going here: http://themeforest.net/downloads It will allow us to release more updates and provide dedicated support in the future. It would encourage our work a lot.
Have a good day!
Kind Regards
The topic ‘Remove add to cart button (NOT CSS)’ is closed to new replies.