This code snippet is over a year old, from before WooCommerce 2.0. I don’t know if this function works with WooCommerce 2.0+.
Remove the ‘add to cart’ buttons on the WooCommerce shop archives page.
/** * remove add to cart buttons on shop archive page */ remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10);
Mike
June 21st, 2013 at 5:39 am
Hi Isabel,
Your code is good, but my client want show add to cart and if the user arre logged. i have try this code and is good for me !
This solution go to complementary your code.
Mike
June 21st, 2013 at 7:38 am
For add a link button product add this :
before “‘;” in the last line
EX :
Lola Teigland
June 25th, 2013 at 12:55 pm
Hi Isabel,
I want to remove the “add to cart” button from the home page because is doesn’t work — it can’t work, because you need to choose variations before you can add to the cart. Instead it redirects to the home page, and that gives me 30-somE pages of duplicate content. Will the code listed at the top of this post work for this? And where do I put it in thefunctions.php file? Mt theme is by Organic themes. THANK YOU!!!!
xaraar
August 9th, 2017 at 3:14 am
Here is a plugin you can use to remove / hide /disable Add to cart
https://wordpress.org/plugins/woo-options/
Alexander
November 2nd, 2017 at 6:13 am
For any shop page or product you can disable the the add 2 cart button. You just have to follow these simple steps. In woocommerce.php
Add this code to the functions.php to disable add to cart from any specific product page
You can see this article as reference https://www.wpblog.com/add-to-cart-button-in-woocommerce-store/
Alexander
November 25th, 2017 at 12:28 am
You have to add this code to make products not available for sale in functions.php file .
For removing add to cart from product pages you simply put this code in woocommerce.php (located wp-content/plugins/woocommerce).
Reference: https://www.wpblog.com/add-to-cart-button-in-woocommerce-store/
Waqas
January 19th, 2018 at 7:00 am
You can use also use this plugin: https://wordpress.org/plugins/remove-add-to-cart-woocommerce/ to remove add to cart.
It removes add to cart from
– Complete shop
– individual products
– Specific category
– also hide prices
thanks