How to Remove Add to Cart Button in WooCommerce

hide price in Woocommerce

Customizing the WooCommerce plugin purchase page will enhance your site experience. For some products, you often need to Woocommerce remove Add to Cart button. For example, if the thing you are selling does not become available.

WooCommerce is one of the most useful plugins for WordPress. By installing this plugin, you can quickly turn a simple WordPress website into a professional online store and use its features. We strongly recommend that you back up your website before making any changes to your WooCommerce configuration.

In this article, I would like to discuss how to remove the Add to Cart buttons in WooCommerce.

Remove Add to Cart Button WooCommerce

There are several ways to remove the WooCommerce “Add to Cart” button from your online store. You can do this in two lines of code with an Elementor plugin or a page assembly. Whichever method works for you, do it and hide it, added to the WooCommerce keymap.

How to Remove Add to Cart Button in WooCommerce Site-Wide?

After completing the setup and adding the product process, the website’s products will appear on the website with the default settings. As you can see, the Add to Cart button is next to the product.

hide add to cart Woocommerce

To remove this button, add the following code anywhere in your functions.php file. In some cases, this code can damage the functions.php file. So it’s better to include the woocommerce.php file.

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

To access the file:
• Go to your WordPress directory.
• Navigate to the plugins in the wp-content folder.
• Select your functions.php or woocommerce.php file.
• Use the first code to remove the Add to Cart button in WooCommerce and the second to remove the price tag.

These commands allow you to remove the add to cart button in WooCommerce for your entire website.

Remove Add to Cart Button from Homepage and Archive Pages

The above code removes the add to cart button in WooCommerce for the entire website. If you want to disable or remove the add to cart button from the home page or archive pages, use the following code in your functions.php or woocommerce.php files:

function react2wp_is_shop_remove_add_to_cart_button() {

if ( is_shop() ) {

add_filter( ‘woocommerce_is_purchasable’, ‘__return_false’ );

}

}

add_action( ‘wp_head’, ‘react2wp_is_shop_remove_add_to_cart_button’ );

Remove Add to Cart Button from Category

If you want to remove the “Add to Cart” button from the category page and still keep it for other pages on your site, use the following code in any file:

function react2wp_is_shop_remove_add_to_cart_button() {

if ( is_product_category() ) {

add_filter( ‘woocommerce_is_purchasable’, ‘__return_false’ );

}

}

add_action( ‘wp_head’, ‘react2wp_is_shop_remove_add_to_cart_button’ );

Hide Price & Add to Cart Button

With the WooCommerce ‘Hide Price and Add to Cart’ Extensions, you can hide prices and add buttons for specific products and categories to your cart. Please select this option to hide it for unregistered customers, registered customers, or user roles. Replace prices with custom text and replace shopping cart buttons with contact forms or custom buttons that point to the page you want.

hide price in Woocommerce

You can also turn on Catalog Mode to hide the ‘Add to Cart’ button for specific products, categories, or the entire store.

Remove Add to Cart Button using the “Hide Price, Hide Add to Cart” WooCommerce plugin.

With the WooCommerce plugin “Hide Price and Add To Cart,” you can easily hide the product price and set your text. You can also add a custom button and pricing text with an icon, including an external link, Skype call, email address, and you can display text on it too.

Have you ever come across a situation where you need to display products but don’t want to take their orders? Because they are out of stock or not ready for sale. In these cases, you can deactivate the shopping cart button for specific items.

Benefits of Using WooCommerce WhatsApp Plugin for Your Store

The ‘Hide Price and Add to Cart’ buttons on the product page allow you to select various options to customize Contact Form 7 to receive offers from a customer for a specific product, hide the price, and display custom text and buttons. You can also display “Contact Form 7” in tabs on the product page.

Specific product or category

This plugin works at both the category level and the individual level. If the store owner does not want to add the “Add to Cart” button to the “All” category, he or she can remove it.

If a store owner wants to remove a specific item from their shopping cart, they can. If someone wants to replace the shopping cart with a request button, they can do that with this plugin.

You can define settings on category pages and specific product pages.

Use Cases of Hide Price & Add to Cart Button

In general, the best marketing approach is to show your prices in advance. Depending on the company, marketing strategies can sometimes suggest something different. Here are some key use cases where this extension could be the best solution.

1. Show prices to logged-in users only

Depending on your marketing strategy, you can hide prices for customers who are not signed in and only show them when they are signed in. For example, if you have different prices for different countries or user roles, you can hide prices and offer the correct prices after logging in.

2. Turn your shop into an online catalog

It’s ideal for sellers who want to showcase their products online by hiding prices and adding cart buttons. The WooCommerce store acts as an online directory that sellers can share with anyone on the go. Depending on your requirements, you can display prices and add them to the shopping cart.

3. Customized products

If you’re selling personalized products, you might not want to see the price on the product page. This plugin allows you to hide the price and replace the add to cart button with a contact form 7 so that your customers can submit their requirements through a simple popup form.

Final Thought

Always remember that you need to do the necessary research before making a decision. The process is simple and can only achieve results using the amazing WooCommerce plugin ‘Hide Price, Hide Add to Cart’. Regardless of which WooCommerce theme you use, the plugin above allows you to remove a button from your shopping cart.

Keep in mind that before making changes to your site, make sure you get a full backup so that you can restore your site to its original state.

If you need more help or want to share another method, leave a comment below.

(Visited 125 times, 1 visits today)