WordPress Black Friday & Cyber Monday Deals 2021!

How to Remove the Quantity Field from a WooCommerce Product Page

By default, WooCommerce shows a quantity selector on a product's page. This might not always be needed, so here are three ways in which you disable this feature.
Product Quantity Shown

In this post, I will show you 3 ways to remove the quantity field from a WooCommerce page.

By default, WooCommerce shows a quantity field or selector on your product pages. While this is an awesome feature to have, it might not always be needed. Say you are offering clients WordPress support plans – you would want each client to purchase only one plan at a time.

Let’s see how it’s done.

1. Using the Option in the Product Data Metabox

To remove the quantity option in WooCommerce, go to your WooCommerce product page in the WordPress dashboard. Scroll down past the editor and you will find the Product Data metabox.

Go to Inventory and enable the checkbox near Sold individually. Doing so allows only one item to be bought in a single order.

WooCommerce Remove Product Quantity

Hit Update and refresh your product page. The quantity field is now disabled!

Note: This setting has to be manually set for each individual product. If you want to set multiple products to be sold individually, you will have to repeat this process for each product. Alternatively, you can use a plugin like WooCommerce Quantity Manager to help speed up the process. We’ll get to this in the next section.

Remove Product Quantity

Follow this quick walkthrough to turn off the quantity option in WooCommerce:

2. Using the WooCommerce Quantity Manager Plugin

The WooCommerce Quantity Manager plugin by Barn2 is a powerful product to help manage your WooCommerce quantities.

The plugin lets you:

  • Set global quantity rules and defaults throughout your store.
  • Set quantity minimums and maximums for specific categories.
  • Add minimum or maximum quantity rules for individual products.
  • Set quantity rules for individual product variations.
  • … and much more.

The WooCommerce Quantity Manager plugin also comes with additional features such as: quantity step values (add interval-based quantities and multiples) and helpful errors and prompts (to guide your customer on their buyer’s journey).

Pricing starts at $79 for 1 site.

35% OFF
Black Friday Deal
WP Mayor readers get an additional 5% discount to the 30% Black Friday deal! This will be applied automatically at checkout.Show More
WP Mayor readers get an additional 5% discount to the 30% Black Friday deal! This will be applied automatically at checkout.Show Less

How to set a maximum quantity of 1 for all products

Once you have installed and activated the plugin, head to the WooCommerce Quantity Manager settings page in WooCommerce. Scroll down to the Order quantity rules section and set the maximum to 1. This will set all your products to have a maximum quantity of 1.

Global maximum quantity set

As you can see in the screenshot above, the plugin lets you set order values, default quantities, and step values. You can also set user roles.

WooCommerce Quantity Manager

Increase your profits by adding advanced quantity rules to your WooCommerce store. Set minimum and maximum quantities, spending rules, defaults, step values and more.

Buy Now

How to set a maximum quantity of 1 for all products in a category

Another great feature of this plugin is that it lets you set quantity rules for specific categories. Let’s say I have a category called “Digital Services”. I would like all the products in this category to have a maximum quantity of 1.

To achieve this in a few seconds, go to the category and scroll down to the Quantity rules section. Set the maximum amount to 1 and in no time at all, all the products in that category will be sold individually.

WooCommerce category quantity rules

The result

Quantity field
No quantity field

3. Using a Hook or Filter to Remove the Quantity Field

Alternatively, you can insert this piece of code into your theme’s functions.php file, or in a custom plugin if you wish. This will remove the quantity field for all your WooCommerce products.

function custom_remove_all_quantity_fields( $return, $product ) {return true;}
add_filter( 'woocommerce_is_sold_individually','custom_remove_all_quantity_fields', 10, 2 );

Next Steps

Finally, I’ve gathered a few articles that will help you take your WooCommerce product pages to the next level.

Check them out below:

Recommended Products

Learn how to add recommended products to your WooCommerce store with some sales-boosting techniques.

Read more >

How to Hide WooCommerce Product Prices Until Login (Easy Guide)

Learn how to hide WooCommerce product prices until a user logs in using a simple plugin.

Read more >

How To Add a Product Gallery Lightbox to WooCommerce

Learn how to increase sales and conversions by adding a product gallery lightbox to your WooCommerce store.

Read more >

Hope you find this helpful!

Jean Galea
Jean Galea
Jean Galea is an investor, entrepreneur, and blogger. He is the founder of WP Mayor, the plugins WP RSS Aggregator and Spotlight, as well as the Mastermind.fm podcast. His personal blog can be found at jeangalea.com.

Consider sharing this post so others can find it:

Share on facebook
Share on twitter
Share on linkedin
Share on reddit
Share on telegram
Share on whatsapp
Share on pocket
Share on email

Join thousands of people receiving real-world, genuine evaluations of WordPress products and services just like this one every week.

Our Sponsors
Solid Affiliate

19 Responses

  1. Thank you, helpful tip! What would be the snippet to remove the qty field from shop/archive pages as well? I found that this field is not working well on mobile devices.

  2. They should really make this a global setting you can set in the backend. But I appreciate the hook.

  3. Hi, that’s really useful. Thanks for publishing. Can you add if it is possible to use the functions.php hook but restricted to a certain category?

  4. Hey, I don’t suppose you have a hook to set the increment value of the quantity box? so 10, 20, 30 instead of 1,2,3?

Leave a Reply

Your email address will not be published. Required fields are marked *

The Beginner’s Handbook
From an introduction on how WordPress works to our recommendations on products and services.

WP Mayor readers get
an additional 5% discount to the 30% Black Friday deal.

This will be applied automatically at checkout
when clicking the button below.

Offer valid until November 30th, 2021.
No coupon code required.

Recommended by WP Mayor

👋 Hey there! We're Gaby and Mark
Every week we share tutorials and genuine reviews of WordPress products and services in our newsletter.
Thousands of people read it!
We’d love for you to join.
We’d love for you to join. Here’s what you’ll be getting:

A single weekly email directly to your inbox.