Sometimes the cart icon just doesn’t match with your website design or it may just become annoying to have it follow visitors around your site.
Good news – you have various options at your disposal to disable it, ranging from changing settings or installing plugins, to writing custom code.
How to Disable the Cart in WooCommerce
Sometimes it may be necessary to temporarily disable your WooCommerce cart for maintenance reasons or when selling products that can’t be purchased online (like external/affiliate products).
One way of accomplishing this goal is using the plugin settings. On the Product Settings page, locate and uncheck all options within Cart Page section – this will remove your cart from site and redirect customers who add items to their carts to No Items in Cart page instead.
Another approach would be using a code snippet; however, this can compromise customer retention and may not always be appropriate to completely conceal your cart.
An alternative method would be to make use of the Catalog Mode feature of a plugin or Theme; this will replace cart and checkout pages with Call to Action buttons like Buy on Amazon or Request a Quote.
WooCommerce-powered websites sometimes display shopping cart icons in menus as an additional feature; while for some store owners this feature may be welcome. There are various methods available to hide or disable it depending on the theme you use and your own individual site needs.
One option would be to install and use the free YITH WooCommerce Catalog Mode plugin which allows you to mark products as “Non-Purchasable”. This will remove the add to cart button from specific product pages and replace it with read more links instead.
Another option available through WooCommerce is using its default settings. Within Products Settings, you can modify Add to Cart button text, Auto Width and Redirect options so they bypass the Cart page and redirect directly to Checkout instead. Furthermore, cart fragments can be connected to custom URLs to display current cart prices and be set as “addable products.”
If a plugin that creates cart fragments is creating requests, there are some measures you can take to disable it. First, ensure your website has fully loaded before activating Element Inspection’s Chrome extension (its icon looks like a sniper scope).
Step two involves clicking the cart symbol. This will display a list of components that make up this cart icon and will allow you to see which requests have been placed and how frequently.
Another alternative would be to switch themes that don’t feature cart symbols in their menu, though this might not be necessary for all businesses. If you wish to keep the plugin but remove its cart icon from certain pages using code, this may work; just ensure your products are set as External/Affiliate type products on WooCommerce; this can be found under Product Settings as well as Page Setup settings on each product.
Businesses without purchasing processes often find the Cart icon to be an annoying presence on their websites, particularly if their stock runs low or there are certain products which don’t require purchase (for example requesting a quote). Under such conditions, businesses may wish to conceal it to reduce confusion for visitors and protect privacy.
One way to disable the Cart in these circumstances is with some custom code. First, ensure your website is fully loaded before right-clicking anywhere on it and selecting Inspect Element from the drop-down list. On the right side will appear an icon similar to a sniper scope with text “Start Element Inspection if hovered over (you can also press Shift + Cmd + C). This will highlight sections or elements on your page such as Cart Fragments Ajax requests queued at Priority 11 which you can disable with remove_action() function before adding code at the end.