{"id":10891,"date":"2020-12-21T11:24:33","date_gmt":"2020-12-21T00:24:33","guid":{"rendered":"https:\/\/terramedia.com.au\/?p=10891"},"modified":"2020-12-24T11:40:34","modified_gmt":"2020-12-24T00:40:34","slug":"4-ways-to-remove-the-add-to-cart-button-in-woocommerce","status":"publish","type":"post","link":"https:\/\/terramedia.com.au\/4-ways-to-remove-the-add-to-cart-button-in-woocommerce\/","title":{"rendered":"4 ways to remove the “Add to Cart” button in WooCommerce"},"content":{"rendered":"\n

Why hide or remove the \u201cAdd to Cart\u201d button? Isn’t that how people buy your products? There are many reasons to hide the \u201cAdd too Cart\u201d button. For example, many products today are launched prior to being available for purchase. Many store owners add detailed product descriptions to their stores to begin working on search rankings and early product promotions. In these cases, store owners may not want to have an “Add to Cart” button on their product page yet but they may still want customers to be able to leave their details. Another possible reason to remove the “Add to Cart” button is when you have a product that requires a quote or where you wish to speak with the customer first.<\/p>\n\n\n\n

How to remove the \u201cAdd to Cart\u201d button from WooCommerce<\/h2>\n\n\n\n

There are several ways to remove the WooCommerce<\/a> \u201cAdd to cart\u201d button from your online store. You can do this with code, WooCommerce<\/a> Stock Control, the Elementor page builder<\/a>, or with a plugin. Whatever method suits you the best, go for it and hide the \u201cAdd to Cart\u201d button from your WooCommerce<\/a> store front-end. Let\u2019s explore how to do this by using code and plugins.<\/p>\n\n\n\n

Removing the \u201cAdd to Cart\u201d button from WooCommerce using code<\/h2>\n\n\n\n

If you are comfortable with editing your theme code, then this is the easiest way to disable the “Add to Cart” button from your WooCommerce<\/a> store. Just add the following code snippet in the functions.php file file of your currently activated theme.<\/p>\n\n\n\n

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', 20);<\/pre>\n\n\n\n

This code snippet will remove the \u201cAdd to Cart\u201d button on the shop page as well as product pages. However, this solution is not very flexible.<\/p>\n\n\n\n

Using a snippet of code like the example above is the most common method to hide the \u201cAdd to Cart\u201d button, but it may not be the best solution for you.<\/p>\n\n\n\n

Adding this code snippet to your functions.php file removes the \u201cAdd to Cart\u201d button sitewide. You must delete the code to get your \u201cAdd to Cart\u201d button back.<\/p>\n\n\n\n

Hiding the \u201cAdd to Cart\u201d button using code<\/h3>\n\n\n\n

The WooCommerce<\/a> \u201cAdd to Cart\u201d button also can be hidden using CSS in the theme customiser instead of editing the theme directly.<\/p>\n\n\n\n

The exact code will depend on your theme. You will need to identify the CSS class for your \u201cAdd to Cart\u201d buttons, or your entire add to cart form. This class may be different for variable products and simple products so you will want to check both.<\/p>\n\n\n\n

The standard CSS classes for the \u201cAdd to Cart\u201d button are:<\/p>\n\n\n\n