Direct answer
To require a minimum order amount in WooCommerce, compare the cart's discounted product subtotal with one positive threshold during WooCommerce's own cart validation. When the subtotal is lower, add a native error that states the minimum, current subtotal, and amount remaining. Do not add a fee, rewrite prices, disable payment gateways, or create an order that must later be repaired.
StoreFixKit's Minimum Order Amount for WooCommerce follows that narrow model. Free applies one store-wide threshold. Pro can use one category threshold plus explicit subtotal exclusions and trigger exceptions.
Decide what “order amount” means before installing anything
A shopper can see several numbers in the cart:
- product subtotal before discounts;
- discounted product subtotal;
- shipping;
- tax;
- fees;
- final order total.
Those numbers answer different business questions. A store trying to protect product-margin economics usually needs the discounted product subtotal, before tax and shipping. Counting shipping could let an expensive destination satisfy a product minimum. Counting tax would make the rule vary by jurisdiction. Ignoring coupons could let a heavily discounted cart appear to qualify when the merchant's actual product revenue does not.
This release therefore uses WooCommerce's discounted product subtotal before tax and shipping. The wording appears beside the setting so the merchant does not have to infer it.
Use validation, not a pricing workaround
WooCommerce publishes a minimum order amount code example that uses cart and checkout validation to display an error. The important architectural point is that a minimum is an eligibility rule, not a price calculation.
A helper plugin should not:
- add a temporary fee to reach the minimum;
- silently increase product prices;
- hide every payment method and leave an unexplained checkout;
- empty the cart;
- create a pending order and then reject it.
Those approaches mutate more store state than the job requires. A validation message is reversible: deactivate the plugin and WooCommerce's original cart path returns immediately.
Validate the cart paths customers actually use
Classic cart and checkout templates run WooCommerce's established cart-item checks. Cart and Checkout Blocks use WooCommerce's Store API. A plugin that handles only the classic page can look correct in one test while the real block checkout bypasses it.
A public support report titled “minimum cart amount doesn't stop purchase” illustrates the merchant-facing symptom. One report does not establish a universal cause, but it is enough to make path coverage a release requirement.
A focused implementation should test at least:
- classic cart below the threshold;
- classic checkout below the threshold;
- Cart Block below the threshold;
- Checkout Block below the threshold;
- the exact threshold;
- a cart above the threshold.
Never block an empty cart
An empty cart has a subtotal of zero, but treating zero as a failed purchase creates a confusing message on an otherwise harmless page. The rule should return before comparison when the cart is empty.
The same fail-passive behavior should apply when the setting is disabled, missing, malformed, zero, or negative. If the plugin cannot prove a valid restriction exists, it should leave WooCommerce unchanged.
Coupon behavior needs an explicit test
Suppose a cart contains $140 of products, a coupon removes $25, and the minimum is $125. The discounted product subtotal is $115, so the shopper needs $10 more.
That result may surprise a merchant who tested only full-price carts. The documentation and shopper message should use the same definition. Test a fixed-cart coupon, a percentage coupon, no coupon, and a coupon removal before launch.
The message tokens {minimum}, {current}, and {remaining} keep the explanation tied to the actual comparison without allowing arbitrary markup.
Category rules should replace one amount, not become a rule engine
A merchant may need a higher threshold when a cart contains a bulky, fragile, wholesale, or made-to-order category. One reusable category amount can solve that job without introducing dozens of priorities.
A bounded rule can work as follows:
- Free supplies the default store-wide amount.
- A non-exempt product in a selected category activates the Pro category amount.
- Selected products can be excluded from the counted subtotal.
- Selected products can be prevented from triggering the category amount.
“Not counted” and “does not trigger” are different. A free sample may need to contribute $0 to the qualifying subtotal, while an accessory may count toward the subtotal but should not activate a bulky-goods minimum.
The official WooCommerce minimum-order extension documentation demonstrates that merchants also seek more configurable rules. That does not mean every small store needs a general condition builder. A one-job plugin should stop before priorities and edge cases become harder to explain than the original problem.
Do not alter accepted cart or order truth
The plugin can read line totals already calculated by WooCommerce. It does not need to write product metadata during a request, recalculate tax, reserve stock, create a custom table, or record customer behavior.
If a threshold changes while a shopper is browsing, the next cart validation can use the new setting. The plugin should not rewrite existing products or orders to “apply” the policy retroactively.
Safety and resource boundary
A minimum-order check runs only where WooCommerce already validates the cart. It needs no frontend JavaScript, stylesheet, cron job, analytics event, customer cookie, or remote request.
It must not change:
- product price or sale price;
- stock or backorders;
- coupons;
- tax or shipping;
- payment methods;
- order status;
- refunds or subscriptions.
StoreFixKit's Minimum Order Amount documentation includes exact setup, Pro precedence, troubleshooting, rollback, and uninstall steps.
Beginner launch checklist
Empty cart
Open the cart with no items. No minimum-order error should appear.
Below, exact, and above
Test one subtotal below the threshold, one exactly equal, and one above. Only the first should block checkout.
Discounts
Apply and remove a real coupon. Confirm the displayed current and remaining amounts match the discounted product subtotal.
Shipping and tax
Change the address or shipping method. The qualifying product subtotal should not increase because shipping or tax increased.
Blocks and Classic
Test the cart and checkout implementation the live site actually uses. Do not assume a Classic test proves Store API behavior.
Pro exceptions
Test a matching category product, a trigger exception, a subtotal exclusion, and a cart containing both matching and non-matching products.
Deactivation and rollback
Deactivate Pro and confirm the Free rule remains. Deactivate Free and confirm checkout returns to ordinary WooCommerce behavior without repairing products or orders.
Security and support evidence
Only a user who can manage WooCommerce should edit the store-wide or Pro rule. Every settings save needs a capability check, nonce verification, bounded sanitization, and escaped output. WordPress's common plugin issues guide summarizes the review expectations around validation, sanitization, and escaping.
Useful support evidence includes the threshold, store currency, discounted product subtotal, coupon, cart type, WooCommerce and plugin versions, expected result, actual result, and screenshots. Remove customer data, credentials, payment details, and full license keys.
FAQ
Does a minimum order amount add a fee?
No. This focused implementation only blocks checkout while the discounted product subtotal is too low.
Does shipping count toward the minimum?
No. Shipping and tax are excluded.
Do coupons reduce the counted amount?
Yes. The comparison uses the discounted product subtotal.
Can an empty cart be blocked?
No. Free 0.1.1 explicitly returns without a notice when the cart is empty.
What happens when Pro expires?
The local Free store-wide minimum keeps working. Pro category and exception behavior requires an active product-bound license.
Focused plugin
Use the one-job implementation.
Require one minimum discounted product subtotal before WooCommerce checkout without adding fees or changing prices, products, stock, payment, or orders.