Minimum order value and quantity
The Minimum order module in Polski for WooCommerce stops a customer from placing an order until the cart reaches a minimum value, a minimum number of items, or both. It shows an error on the cart and checkout pages and blocks the order. Each threshold is off while it is set to 0, which is the default.
Configuration
Section titled "Configuration"Go to Polski > Modules and enable the Minimum Order Value / Quantity module.
Then configure the thresholds in Polski > Settings > Checkout & Orders:
| Setting | Description | Default |
|---|---|---|
| Minimum order value | Amount in the store currency (0 = disabled) | 0 |
| Minimum number of items | Number of items (0 = disabled) | 0 |
| Exclude sale items from minimum value | Do not count products on sale toward the minimum value | No |
| Message for minimum value | Error text with the {min_value} and {current_value} tokens |
Minimum order value is {min_value}. Current cart value: {current_value}. |
| Message for minimum quantity | Error text with the {min_quantity} and {current_quantity} tokens |
Minimum number of items per order is {min_quantity}. Current quantity: {current_quantity}. |
The settings are stored in the polski_minimum_order option.
How it works
Section titled "How it works"The module validates the cart in two places:
- Cart page (
woocommerce_check_cart_items): displays an error message - Checkout page (
woocommerce_checkout_process): blocks order placement
If the cart does not meet the requirement, the customer sees an error message and cannot proceed to payment. An empty cart is never checked. When both thresholds fail, the customer sees both messages.
What is counted
Section titled "What is counted"| Threshold | Compared against |
|---|---|
| Minimum value | The cart subtotal as WooCommerce displays it: before coupons and shipping, with or without tax depending on the "Display prices during cart and checkout" setting |
| Minimum value with sale items excluded | The sum of the full-price items only, with or without tax by the same setting |
| Minimum quantity | The total quantity of all items in the cart (two units of one product count as 2) |
The {min_value} and {current_value} tokens are formatted with the store's price format and currency.
Message examples
Section titled "Message examples"Minimum value:
Minimum order value is 50.00 PLN. Current cart value: 29.99 PLN.
Minimum quantity:
Minimum number of items per order is 3. Current quantity: 1.
Excluding products on sale
Section titled "Excluding products on sale"The "Exclude sale items from minimum value" option leaves discounted products out of the minimum cart value. A product counts as on sale when WooCommerce reports it so (is_on_sale()), which includes scheduled sale prices while they are active. Use it when the minimum should apply only to full-price products. Sale items still count toward the minimum quantity.
Per-role thresholds
Section titled "Per-role thresholds"The module reads an optional role_overrides entry in the polski_minimum_order option, keyed by user role, each with its own min_value and min_quantity. A logged-in customer whose first role has an entry gets those thresholds instead of the global ones. There is no screen for this; set it in code or with WP-CLI.
$settings = get_option( 'polski_minimum_order', [] );$settings['role_overrides'] = [ 'wholesale_customer' => [ 'min_value' => 500, 'min_quantity' => 10 ],];update_option( 'polski_minimum_order', $settings );Use cases
Section titled "Use cases"| Scenario | Configuration |
|---|---|
| Wholesale store (B2B) | Min. value 200 PLN, min. quantity 5 |
| Free shipping above an amount | Min. value 100 PLN (an alternative to a free shipping threshold) |
| Preventing micro-orders | Min. value 20 PLN |
| Products sold in packs | Min. quantity 3 |
Compatibility
Section titled "Compatibility"The module works with:
- WooCommerce Checkout Blocks
- Classic checkout (shortcode)
- All payment methods
- Multi-step checkout (Polski PRO)
Does the minimum order value include shipping or coupons?
Section titled "Does the minimum order value include shipping or coupons?"No. The module compares the cart subtotal before coupons and shipping. Whether tax is included follows the WooCommerce setting for displaying prices in the cart and checkout.
Can wholesale customers have a higher minimum than everyone else?
Section titled "Can wholesale customers have a higher minimum than everyone else?"Yes. Add a role_overrides entry for their user role in the polski_minimum_order option. Guests and customers whose first role has no entry use the global thresholds.
Can I change the error message?
Section titled "Can I change the error message?"Yes. Edit "Message for minimum value" and "Message for minimum quantity" in Polski > Settings > Checkout & Orders. Keep the tokens to show the threshold and the current cart figure.