Website Building » WooCommerce » How Do I Hide Add to Cart Button in WooCommerce?

How Do I Hide Add to Cart Button in WooCommerce?

Last updated on October 1, 2022 @ 1:18 pm

It’s no secret that the “Add to Cart” button is one of the most important elements on a WooCommerce product page. After all, it’s the button that allows customers to add your products to their shopping cart and ultimately make a purchase.

While the “Add to Cart” button is essential for making sales, there are some situations where you might want to hide it. For example, you might want to hide the button on products that are out of stock or on products that are only available for purchase in person (e.g. tickets to an event).

Fortunately, hiding the “Add to Cart” button in WooCommerce is relatively easy to do. In this article, we’ll show you how to hide the “Add to Cart” button in WooCommerce using two different methods.

Method 1: Hide the “Add to Cart” Button Using a Plugin

The easiest way to hide the “Add to Cart” button in WooCommerce is by using a plugin. We recommend using the Hide Add to Cart plugin. It’s a free plugin that’s available from the WordPress plugin repository.

To use the Hide Add to Cart plugin, simply install and activate it on your WordPress site. Once it’s activated, go to Settings → Hide Add To Cart and select which user roles you want to hide the “Add To Cart” button from.

By default, the plugin will hide the “Add To Cart” button from guests and customers. However, you can also choose to hide it from administrators and shop managers as well.

After making your selection, click on the “Save Changes” button at the bottom of the page and you’re done! The “Add To Cart” button will now be hidden from the selected user roles on your WooCommerce store.

PRO TIP: If you are considering hiding the Add to Cart button in WooCommerce, be aware that this may have unintended consequences. For example, hiding the button may make it more difficult for customers to purchase your products, which could lead to lost sales. Additionally, hiding the button may make it more difficult for you to manage your inventory, as you will not be able to track sales as easily.

Method 2: Hide the “Add to Cart” Button Using Custom CSS

If you don’t want to use a plugin, then you can also hide the “Add To Cart” button by adding some custom CSS to your WordPress site. While this method requires a bit more technical know-how, it’s still relatively easy to do.

First, you’ll need to access your WordPress site’s code editor. If you’re not familiar with how to do this, then check out our guide on how to connect to WordPress using FTP.

Once you’re connected, navigate to your site’s /wp-content/themes/ directory and look for your active theme’s folder (e., /wp-content/themes/theme-name/). Once you’ve located your theme’s folder, open it and look for a file called style.css. Right-click on that file and select View/Edit.

When you open style.css in your code editor, look for a section at the top of the file called /* Start Custom CSS */ . If this section doesn’t exist in your file, then create it by adding the following line of code: /* Start Custom CSS */ . Below this section, add the following CSS rule:

.add-to-cart { display: none; }

This CSS rule will tell WooCommerce not to display the “Add To Cart” button on any product pages. Once you’ve added this rule, save your changes and upload style.css back onto your server. The “Add To Cart” button should now be hidden on all of your product pages!

Conclusion

Hiding the “Add To Cart” button can be useful in some situations, such as when products are out of stock or when they’re only available for purchase in person (e., tickets for an event). Fortunately, hiding the “Add To Cart” button in WooCommerce is relatively easy – either use a plugin or add some custom CSS code!

Kathy McFarland

Kathy McFarland

Devops woman in trade, tech explorer and problem navigator.