WooCommerce Tip: Exactly How To Disable Quantity Change in Cart

Bearded web designer sitting at computer with bank of monitors

If you sell products with limited inventory in your WooCommerce store, you may want to disable customers from changing quantities directly in their cart. This prevents them from upping quantities of scarce products.

Luckily, with a couple tweaks you can easily remove the quantity selector from the cart in WooCommerce. In this post, I’ll walk through the step-by-step process.

Why Disable Cart Quantity Changes?

There are a few reasons you may want to disable quantity changes in the cart:

  • You have limited stock levels. Preventing quantity increases protects inventory.
  • You use tiered pricing. Customers could manipulate prices by adding quantities.
  • You offer bundled products. Bundles should be purchased as a set.
  • You want to force customers to checkout. Removing quantities makes the cart a static display.

Whatever your reason for optimizing your WooCommerce experience, disabling this feature takes just a couple minutes.

WooCommerce – Disable Quantity Change in Cart – 2 Methods

Method 1: Disable Quantity Change in Cart with a Plugin

  1. Install the WooCommerce Extra Product Options plugin. This gives granular control over cart functions.
  2. Once activated, go to WooCommerce > Settings > Extra Product Options.
  3. Scroll down to the “Disable customer interaction with cart” section.
  4. Check the box for “Disable Quantity Field”.
  5. Click Save Changes.
WooCommerce Extra Product Options plugin screenshot

That’s it! The plugin immediately removes quantity selectors from the cart. Customers can still see quantities, but can no longer directly edit them.

It’s a simple but powerful tweak for stores with limited inventory or products with fixed bundles. Just install the plugin and toggle one setting to lock down your WooCommerce cart quantities.

Method 2: Disable Quantity Change in Cart with Code & a Plugin

The above plugin method is the easiest way to remove quantity selectors from the cart. But if you want more precise control, you can also achieve the same result with a small code tweak.

Here’s how to disable quantity changes in the cart using code:

  1. Install and activate the Code Snippets plugin by Shea Bunge. This allows you to easily add custom PHP to your site.
  2. Create a new snippet with the following code:
add_filter( 'woocommerce_cart_item_quantity', 'wc_cart_item_quantity', 10, 3 );
  function wc_cart_item_quantity( $product_quantity, $cart_item_key, $cart_item ) 

    { if ( is_cart() )
      { $product_quantity = sprintf( '%2$s <input type="hidden" name="cart[%1$s][qty]" value="%2$s" />', $cart_item_key, $cart_item['quantity'] ); 

  return $product_quantity; }
  1. Give the snippet a title like “Disable Cart Quantity Change”.
  2. Set the snippet status to “Active”.
  3. Click Save Snippet.
Screenshot of the Code Snippet Plugin

This will remove all quantity selectors from the cart page. Customers will only see the quantities without the ability to edit them.

The code works by replacing the quantity input with plain text plus a hidden field. This maintains cart functionality without the interactive selector.

Using code snippets gives you precise control to customize WooCommerce behavior. For simplicity, a plugin like extra product options may be preferable. But coding tweaks are powerful for advanced custom cart logic.

Let me know if you have any other WooCommerce customization, or of course, WooCommerce SEO questions!

Scroll to Top