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.