Home > WooCommerce > Docs > How to Set Minimum and Maximum Order Quantity in WooCommerce

How to Set Minimum and Maximum Order Quantity in WooCommerce

Last updated: February 01, 2024
This article has been written and researched by our expert Avada through a precise methodology. Learn more about our methodology





In many instances, you may wish to limit the number of purchases on your eCommerce store. Adding restrictions might aid in increasing profitability and boosting operational effectiveness in a variety of company structures. This is especially true if you own a wholesale business or have a unique production process. However, the question is, how do you add this functionality to your WooCommerce store?

That’s why today’s tutorial will show you how to set minimum and maximum order quantities in WooCommerce. Setting a WooCommerce minimum order amount is an excellent strategy to increase your income since it forces your customers to add more goods to their cart to reach a particular order number, after which they may advance to the checkout page. So, let’s dive in!

Benefits of setting minimum and maximum order quantity in WooCommerce

You may wish to apply maximum and minimum quantity constraints to your WooCommerce store for various reasons. All eCommerce websites have high backend costs such as processing time, shipping charges, and warehousing and distribution fees. As a result, low order quantities are frequently loss-making. So, in WooCommerce, you can define a minimum order quantity. You can assure that ALL orders, regardless of amount, are lucrative.

setting minimum and maximum order quantity in WooCommerce

Applying a maximum quantity or order value prevents clients from placing orders that might deplete your inventory. Either that or undercut your rates. Changing the standard quantity in WooCommerce encourages consumers to buy more from you. In a primary WooCommerce store, the default is set at zero, enabling buyers to place minor orders. Customers may automatically order three products if you increase that to a default of three (or even more). Because they’d think that’s what other people who visit your online business are doing.

How to set minimum and maximum order quantity in WooCommerce

In this post, we’ll show you two different ways to establish the minimum order quantity in WooCommerce. Now, if you’re looking for the best ways to create a minimum order quantity in WooCommerce, let’s get started.

Method 1: Coding

To implement the WooCommerce minimum order amount on your website, we need to add some new code to the Theme Functions. It is strongly advised that you build a child theme and enable it on your WooCommerce site to prevent theme issues when modifying. To enter the Theme Functions, navigate to Appearance > Theme Editor from your WordPress dashboard.

Select Theme Editor

Then you’ll be sent to the theme editor page, where you’ll see the Theme Functions section on the right side of the screen (also named Functions.php File)

add_action( 'woocommerce_check_cart_items', 'required_min_cart_subtotal_amount' );
function required_min_cart_subtotal_amount() {

// HERE Set minimum cart total amount

    $minimum_amount = 200;

// Total (before taxes and shipping charges)

    $cart_subtotal = WC()->cart->subtotal;

// Add an error notice is cart total is less than the minimum required

    if( $cart_subtotal < $minimum_amount  ) {
// Display an error message

        wc_add_notice( '<strong>' . sprintf( __("A minimum total purchase amount of %s is required to checkout."), wc_price($minimum_amount) ) . '<strong>', 'error' );

Copy the preceding code snippet and put it into the Functions.php file, then update the file immediately.

Update your file

We have set the minimum order value to $200 using the code snippet mentioned above. Customers will be unable to complete a purchase if the cart value is less than $200, forcing them to buy more and helping you earn more. You may alter the minimum value by substituting 200 with whatever number you choose. This is how your clients will seem if their basket does not contain the required minimum order quantity.

The result

Method 2: Using a third-party plugin

The following method is to use a third-party plugin. WooCommerce Quantity Manager is a valuable tool for setting minimum and maximum purchase amounts in your WooCommerce website. You can obtain total control over your product quantity by installing this plugin. You will also have complete control over how much or how little your consumers may purchase. It not only ensures that you will function efficiently, but it also prohibits you from ever retaking a loss-making order.

WooCommerce Quantity Manager

To save time, We advise that you apply min and max quantity restrictions to WooCommerce at the most significant level feasible. This is because global rules only need to be configured once, whereas product-level rules must be configured for each product. Keeping this in mind, follow the guidelines that are most applicable to your shop. You don’t have to provide every possible minimum and maximum quantity rule. Add the ones you require and discard the rest. It’s OK, for example, to provide a minimum order quantity without specifying a maximum amount. The WooCommerce min/max quantity plugin will intelligently apply the appropriate rule to each product, avoiding conflicts.

Set a global minimum and maximum order quantity for WooCommerce

Setting up global quantity restrictions is typically the best place to start because it ensures that all orders you get are lucrative. Follow these procedures to create global quantity rules:

  • Navigate to WooCommerce > Settings > Products > Quantity Manager from your dashboard.

Select Quantity Manager

  • When you enter the Quantity Manager page, you will notice several adjustable elements.
  • Enter your Minimum and Maximum order amounts in the Order Quantity Rules section.

Order Quantity Rules

  • Following that, you’ll notice Order Value Rules on the line below. You can specify your order’s minimum and maximum values here (price per order).

Order Value Rules

  • Then, in the Global Default Quantity box, enter your chosen value.

Global Default Quantity

  • Enter your desired item increments in the Quantity Step Values box to determine increments. Customers will be forced to buy things in increments of ten. For example, 5, 10, 15, and 20.

Quantity Step Values

  • Finally, identify the user roles to which these global rules should apply. All user roles that may be purchased from your store are chosen by default.

Select user roles

That’s all there is to it; you’ve now applied your quantity and order rules throughout your store!

The result

But what if you want to make your rules more specific? Let’s go through how to put up rules for particular categories and goods.

Set category min-max quantity rules to WooCommerce

When you create category-level quantity rules, they override the global restrictions for the goods in that category. You may override the category rules by defining alternative rules for specific interests in that category (which we’ll go over shortly). Follow these steps to create category amount rules:

  • Go to Products > Categories from your dashboard.
  • Choose the category you want to modify.

Select your category

  • Scroll to the bottom until you see the Quantity Rules choices presented underneath the standard category fields.

Quantity Rules

  • Add your minimum and maximum order quantities and values, as well as your standard order amounts and increments.
  • Select the Update button.

Now that we’ve covered category rules let’s go through how to put up rules for specific goods and variants.

Set a minimum-maximum quantity for each product in WooCommerce

When you define quantity rules for specific items, they take precedence over any global or category-level regulations that apply to almost the same product. Consequently, if you define product and variation rules for the same product, the variation-level rules will be involved in addition to the product rules. Variations that do not have their own rule will be subject to the product-level rule. Follow these steps to create product-level quantity rules:

  • Navigate to Products > Edit Product from your dashboard.
  • Scroll down to the Product Data tab and choose the Inventory section, where the Quantity Rules will be shown.
  • Input your order minimums and maximums, as well as default order amounts and increments.
  • Save or update your product.

Set a minimum/maximum quantity for each product

Set min and max quantity rules to individual variations

The methods for adding min/max amounts to specific items above apply to essential and variable products. When you apply product-level rules to variable products, they are used to all versions of that product. Customers, for example, could mix and match variations until they have at least 10 in the basket if there is a per-product minimum order quantity of 10.

Set min and max quantity rules to individual variations

If you wish to specify minimum and maximum amount rules for each variation separately, you may do so. Instead of putting the rule in the Inventory page, go to the Variations area and click on each variant to amend it. Here you’ll find the variation’s min/max quantity fields.

5 best plugins to set minimum and maximum order quantity in WooCommerce

WooCommerce Minimum-Maximum Quantity

Using the WooCommerce Minimum/Maximum Quantity plugin, you can define minimum and maximum quantity restrictions for product quantities, orders, and variants. This helpful plugin determines the number of items purchased by setting minimum and maximum criteria and multiple/group amounts per product (including variations). To define minimum/maximum amounts during checkout, you may use the Min/Max Quantities plugin to impose quantity limitations.

WooCommerce Minimum/Maximum Quantity

Outstanding features:

  • Define the maximum order value to limit how much a user may spend.
  • Specify a minimum order value that a user must pay to ensure that every order is profitable.
  • To make maintaining your site easier, set quantity defaults on a global or product level.
  • Create order increments for all or a subset of the goods you wish to sell in batches.
  • Create various rules to customize your users’ experience. For instance, you may have one rule for retail and another for wholesales.

Price: You can start using this plugin with the basic license, which costs $19 per year.

ELEX Minimum Order Amount for WooCommerce

You may configure the ELEX Minimum Order Amount for WooCommerce plugin so that consumers can only make purchases in your store if they add things that cost more than the minimum defined value to their cart. The limits are established using WordPress user roles. For each user position accessible in your business, you may specify the minimum and maximum subtotal amounts. Furthermore, you may show a personalized warning message for each user role when the standards are not satisfied.

ELEX Minimum Order Amount for WooCommerce

Outstanding features:

  • You can limit the amount by setting a minimum and maximum amount.
  • With a warning text message, you may inform consumers of the total order amount restriction.
  • Because the text field supports HTML, you can insert HTML components in your message as well.
  • Enable the relevant rule for the user role to apply the order amount limitation.
  • You may also deactivate the rule while specifying the order amount limitation and warning wording and store it for later use.

Price: This plugin is free to download.

YITH WooCommerce Minimum Maximum Quantity

The YITH WooCommerce Minimum Maximum Quantity plugin allows you to set quantity limits for purchases on your WooCommerce shop. You may configure the quantity rules based on your profit projections and operational considerations. While applying quantity limitations, you may consider numerous aspects such as the product in the basket, total cart value, delivery expenses, and so on. Furthermore, the plugin assists you in guiding your consumers to purchase the optimal amount for the most excellent discounts while maintaining a positive customer experience.

YITH WooCommerce Minimum Maximum Quantity

Outstanding features:

  • Have an influence on the goods in the basket, and set a minimum and a maximum number of things that may be purchased.
  • To complete an order, enter the minimum and maximum expenditure amounts.
  • You have complete control over the messages displayed to your users when they do not follow your guidelines.
  • Select the rules you wish to employ and apply them to your store, presenting the entire list to your customers on the product description page.
  • As the administrator of your online store, you can exclude any items from applying the general regulations.

Price: You can get this plugin at the cost of €34.99 for an annual subscription.

Min-Max Quantities

The Min/Max Quantities plugin allows you to set up various rules for specifying quantities for goods, variants, and orders. Based on your shop strategy, you may set minimum and maximum thresholds. You may also define a minimum or maximum cost for the entire cart to checkout. These rules may be put up for orders, individual goods, or variants using the plugin. Customers will not check out if their carts do not exceed the stated quantity or pricing restrictions.

Min/Max Quantities

Outstanding features:

  • Set the minimum and maximum amounts, as well as the charges for checkout.
  • Configure the rules for orders, goods, specific variants, and categories.
  • When a customer’s cart does not satisfy the requirements, an error message is displayed.
  • Specific items should be excluded.
  • Control of the product described above regulations on a per-variation basis

Price: You can get this plugin at the cost of $17.40 for a year of subscription.

Product Quantity for WooCommerce

The Product Quantity for WooCommerce plugin gives you a lot of flexibility in adjusting product quantities in your Checkout pages. In addition to setting minimum and maximum quantity restrictions in order, it allows you to establish per-item quantity limits on an order-by-order basis. Furthermore, it provides an easy-to-use interface that allows you to set up various rules quickly. Custom message options will enable you to show clients the appropriate quantity rules. There are other options to allow cart notifications.

Product Quantity for WooCommerce

Outstanding features:

  • Configure minimum and maximum quantities for each item, product, and cart total.
  • Allow only a predetermined amount of a specific product or the complete catalog to be purchased.
  • Set quantity rules for each category.
  • Change the default WooCommerce setting to input quantity using a drop-down menu.
  • Personalized messaging to adequately explain constraints to consumers.

Price: The plugin costs $39.99 for a single site license.


Implementing minimum and maximum order amounts to your WooCommerce business assures that you never again receive a loss-making order. Even better, when increasing order sizes, you may specify specific increments. This will guarantee that you are as efficient as possible while sending your items. With the WooCommerce Quantity Manager plugin, you can easily integrate all of this and more at the order, product, category, variant, and even user role level.

We hope this tutorial will help you understand how to set minimum and maximum order quantities in WooCommerce. The coding method will be best if you have some programming knowledge. Otherwise, using a plugin is an excellent choice if you are new to this field. Lastly, these WooCommerce plugins to set minimum and maximum quantity mentioned above can assist you in better controlling order quantity and value.

Sam Nguyen is the CEO and founder of Avada Commerce, an e-commerce solution provider headquartered in Singapore. He is an expert on the Shopify e-commerce platform for online stores and retail point-of-sale systems. Sam loves talking about e-commerce and he aims to help over a million online businesses grow and thrive.

Stay in the know

Get special offers on the latest news from AVADA.