How to set a minimum order quantity in WooCommerce
By Raz Technologies · published · data updated
How do I set a minimum order quantity in WooCommerce?
Use a wholesale pricing plugin with minimum quantity rules (6 of the 16 we track document one, 3 in the free version) or add three WooCommerce hooks (below) that set the minimum and block checkout below it. As of 2 November 2026, the top-ranked plugin in our wholesale pricing ranking is Tiered Pricing Table for WooCommerce (83.2/100). See our wholesale pricing plugin ranking for the full comparison.
The problem
Wholesale and trade stores often sell only in cases or above a minimum number of units, while retail customers can buy one. WooCommerce has no minimum quantity setting, so the rule needs a plugin or custom code.
Option 1: a plugin (no code)
These ranked wholesale-pricing plugins document a minimum order quantity per product or per role. The column shows whether it is in the free or the paid version (evidence: Documented, from each plugin's readme or listing).
| Plugin | Rank | Feature in | Checkout Blocks | Installs |
|---|---|---|---|---|
| Tiered Pricing Table | #1 | Free version | Yes | 10,000+ |
| WooCommerce B2B | #4 | Paid version | Not declared | No data |
| Role Based Pricing for Woo by Meow Crew | #5 | Paid version | Yes | 2,000+ |
| Whols | #6 | Free version | Not declared | 3,000+ |
| Role Based Pricing | #12 | Not stated | Not declared | 100+ |
| Wholesale & Tiered Pricing | #13 | Free version | Not declared | 100+ |
Option 2: three hooks (for developers)
This sets a minimum of 10 units per product line for customers with the wholesale_customer role and 1 for everyone else. Add it to a small custom plugin or your child theme's functions.php, and change the role and number to yours.
function my_store_min_qty() {
$roles = (array) wp_get_current_user()->roles;
return in_array( 'wholesale_customer', $roles, true ) ? 10 : 1;
}
// Product page quantity box
add_filter( 'woocommerce_quantity_input_args', function ( $args, $product ) {
$args['min_value'] = max( (int) ( $args['min_value'] ?? 1 ), my_store_min_qty() );
if ( ! is_cart() ) {
$args['input_value'] = max( (int) ( $args['input_value'] ?? 1 ), $args['min_value'] );
}
return $args;
}, 10, 2 );
// Block cart quantity selector (Store API)
add_filter( 'woocommerce_store_api_product_quantity_minimum', function ( $min, $product, $cart_item ) {
return max( (int) $min, my_store_min_qty() );
}, 10, 3 );
// Stop checkout if a line is below the minimum
add_action( 'woocommerce_check_cart_items', function () {
$min = my_store_min_qty();
foreach ( WC()->cart->get_cart() as $item ) {
if ( $item['quantity'] < $min ) {
wc_add_notice( sprintf( __( '%1$s: the minimum order quantity is %2$d.', 'my-store' ),
$item['data']->get_name(), $min ), 'error' );
}
}
} );Then test as a guest and as a wholesale customer: the product page, the cart (classic or block) and the checkout.
What to check before you choose
- Whether the minimum is per product, per variation, per category or for the whole order.
- Whether it can differ by user role, so retail customers can still buy one unit.
- Whether you also need a minimum order value (fewer plugins document it).
Other plugins people ask about
- Wholesale Suite ranks #2 of 15 in our wholesale pricing ranking as of 2 November 2026 (score 80.9/100). Its strongest scores are adoption (active installs) and maintenance (updates, compatibility, support); its weakest are security (vulnerability history) and performance (our lab).
- WholesaleX is not part of our wholesale pricing ranking; we rank it #5 of 5 in all-in-one B2B (as of 2 November 2026).
FAQ
Does WooCommerce have a minimum order quantity setting?
No. WooCommerce core only offers "Sold individually" (a maximum of one). A minimum quantity per product or per customer role needs a plugin or a few lines of code.
Can I set a minimum order value instead of a quantity?
Yes, but fewer plugins document it: 1 of the 16 wholesale-pricing plugins we track document a minimum order value, against 6 for a minimum quantity (as of 8 November 2026).
Will a minimum quantity work with the block cart and checkout?
Test it. The block cart has its own quantity selector, so code needs the Store API filter shown above, and plugins need to support the blocks: 5 of the 16 wholesale-pricing plugins we track declare Cart & Checkout Blocks compatibility (as of 8 November 2026).
