How to Set a Minimum Order Amount in WooCommerce
Small orders can quietly eat into your profit. Packaging, payment fees and shipping often cost the same whether a customer spends $5 or $50. So a WooCommerce minimum order is one of the simplest ways to make sure every order is worth fulfilling.
However, WooCommerce does not include a store-wide minimum order setting out of the box. In this guide, you will learn what WooCommerce offers by default, how to add a basic minimum with a code snippet, and when a plugin is the better choice.
Why set a WooCommerce minimum order?
A minimum order amount protects your margins. For example, if shipping a parcel costs you $6, a $4 order loses money before you even count your time.
It also helps in other ways:
- Wholesale stores can make sure trade buyers order in realistic quantities.
- Stores that ship abroad can also require a higher amount for international orders, where shipping costs more.
- Every store can nudge customers to add one more item, so the average order value goes up.
What WooCommerce offers by default
WooCommerce has two settings that look similar. However, neither of them blocks small orders.
1. Coupon minimum spend
When you edit a coupon, the Usage restriction tab has a Minimum spend field. It only controls when that coupon works, though. Customers without the coupon can still check out with any amount. You can read more in the WooCommerce coupon documentation.
2. Free shipping minimum amount
The Free shipping method can require a minimum order amount before it appears. This is useful, but it only decides who gets free shipping. As a result, customers can still pay for regular shipping and place a small order.
So if you want to stop orders below a set amount, you need either a small code snippet or a plugin.
Option 1: Add a WooCommerce minimum order with code
If you are comfortable editing code, add this snippet to your child theme’s functions.php file or to a code snippets plugin. It shows a notice on the cart page and blocks checkout when the cart subtotal is below $25.
add_action( 'woocommerce_before_cart', 'xt_minimum_order_notice' );
add_action( 'woocommerce_checkout_process', 'xt_minimum_order_notice' );
function xt_minimum_order_notice() {
$minimum = 25;
$subtotal = WC()->cart->get_subtotal();
if ( $subtotal < $minimum ) {
$message = sprintf(
'Your current order total is %s. The minimum order amount is %s.',
wc_price( $subtotal ),
wc_price( $minimum )
);
if ( is_cart() ) {
wc_print_notice( $message, 'error' );
} else {
wc_add_notice( $message, 'error' );
}
}
}
Change 25 to your own minimum. Also, always test on a staging site first, because a mistake in functions.php can take your site offline.
The snippet works, but it has limits:
- It uses one amount for every customer, product and location.
- It only hooks into the classic cart and checkout. Because the WooCommerce Cart and Checkout Blocks process orders differently, the snippet does not block checkout there.
- You need to edit code every time you want to change the amount or the message.
Option 2: Use a plugin for flexible minimum order rules
If you need more than one fixed amount, a plugin saves time. Our Minimum Order Amount for WooCommerce plugin lets you set minimum and maximum order amounts without code.
For example, you can:
- Set a store-wide minimum and maximum with one toggle.
- Create rules by product, category, user role, payment method or shipping method.
- Use different amounts by country, state or zip code.
- Combine conditions with AND / OR logic, and then control which rule runs first.
- Show a cart message with the
{amount_remaining}placeholder, so customers see how much more they need to add. - Write your own checkout error messages.
The plugin is also compatible with HPOS, the WooCommerce Checkout Block and WPML. Plus, validation only runs at cart and checkout, so your product pages stay fast.
How to set up a WooCommerce minimum order with the plugin
- First, install and activate Minimum Order Amount for WooCommerce.
- Then open the plugin settings, turn on the global minimum and enter your amount.
- Next, add rules for specific products, roles or locations if you need them.
- Finally, edit the cart and checkout messages so they match your store’s tone.
After that, add a product below your minimum to the cart and check that the message appears. The whole setup usually takes under five minutes.
Watch the plugin in action:
Tips for choosing the right minimum
- Start with your costs. Add up packaging, payment fees and average shipping cost per order. Your minimum should cover them, with room for profit.
- Keep it reachable. If most products cost $15, a $20 minimum encourages one more item. In contrast, a $100 minimum may simply drive customers away.
- Explain it clearly. A friendly message such as “Add $8 more to complete your order” works better than a plain error.
- Review your results. After a few weeks, compare your average order value and cart abandonment, and then adjust the amount.
Conclusion
WooCommerce does not stop small orders on its own. For one simple amount on the classic checkout, a code snippet is enough. However, if you need different rules by product, role or location, or you use the Checkout Block, a WooCommerce minimum order plugin is the easier route. Minimum Order Amount for WooCommerce handles all of this without code.
Would you rather charge a small fee than block small orders? Then see our guide on how to add a WooCommerce conditional fee.
Want to improve other parts of your store? Explore our full range of WooCommerce plugins.
1 comment