How to Hide “Add to Cart” Button in WooCommerce Quickly

Once on your project, you will maybe need to disable selling products, make a catalog from your e-commerce store, or simply hide the button Add to cart for some reasons. Sometimes this button is missing, but that is not your case.

If you want to hide the “Add to cart” button without stress and pain, do the following steps. It’s really simple, so go straight in without more words.

WooCommerce “Add to cart” button will be hidden sitewide. All you need is to insert these two lines into functions.php (/wp-content/your_theme/functions.php). 

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 );

Voalá! Your cart button is hidden. It works with the newest WooCommerce, tested on WooCommerce 6.4.1 and older.

UNLIMITED DOWNLOADS: 50+ Million Website Templates & Design Assets

All the Website Templates you need and many other design elements, are available for a monthly subscription by subscribing to Envato Elements. The subscription costs $16.50 per month and gives you unlimited access to a massive and growing library of over 50 million items that can be downloaded as often as you need (stock photos too)!

Recent Articles

How to Hide “Add to Cart” Button in WooCommerce Quickly

Once on your project, you will maybe need to disable selling products, make a catalog from your e-commerce store, or simply hide...

Agronix – Organic Farm Agriculture WordPress Theme [Free WordPress theme download]

Demo Download Agronix – Organic Farm WordPress Theme. We are Happy to presenting you the Agronix Agriculture Farming WordPress Theme. It is very easy to customize...

Roux – Creative Portfolio WordPress Theme [Free WordPress theme download]

Demo Download This is Roux, a splash of vibrant creativity your beautiful new website needs! Roux comes with tons of creative portfolio, gallery and graphic...

Brico – Plumber WordPress Theme [Free WordPress theme download]

Demo Download Features Overview Drag and drop page builder – Elementor One click install demo Demo content included WPML, RTL...

Get in touch

Be our first-class reader, build a community and follow us on social media!

Leave A Reply

Please enter your comment!
Please enter your name here