Useful article if you administer online stores built with wocommerce and you want to know how to set a minimum order in WooCommerce. In the default settings of an online store self-hosted, checkout option does not exist. Therefore, establishing the minimum amount for an order, will be done by another method.
Compared to a physical store, one online often imposes new rules, depending on the clients to whom the products marketed, their value and the payment and delivery methods.
If there is no problem in a physical store if we enter and buy a product of 10 cents, in an online store things are a little different. Any order made by a client involves some costs from the store. From the simple processing of the order to the packing, shipping, all these operations need time.
When the sale offer contains very cheap products, it is good to put a minimum amount for each order. For example, an order cannot be completed if the total products in the basket do not reach the amount of 10 euros.
How to set a minimum order amount in WooCommerce
The simplest method is to add a personalized function in functions.php through which you can set the minimum amount for order in WooCommerce.
Open the file functions.php of the active theme (preferably be Child-theme) and add the following code:
// Set Minimum Order Amount in WooCommerce
add_action( 'woocommerce_checkout_process', 'wc_minimum_order_amount' );
add_action( 'woocommerce_before_cart' , 'wc_minimum_order_amount' );
function wc_minimum_order_amount() {
$minimum = 10; // Set this variable to specify a minimum order value
if ( WC()->cart->total < $minimum ) {
if( is_cart() ) {
wc_print_notice(
sprintf( 'Your current order total is %s — you must have an order with a minimum of %s to place your order ' ,
wc_price( WC()->cart->total ),
wc_price( $minimum )
), 'error'
);
} else {
wc_add_notice(
sprintf( 'Your current order total is %s — you must have an order with a minimum of %s to place your order' ,
wc_price( WC()->cart->total ),
wc_price( $minimum )
), 'error'
);
}
}
}
Also from here is set the message by which the buyer is warned that he does not have products whose total amount does not reach the minimum limit for placing the order.

- How do you automatically delete product images in WooCommerce, with the product
- Fix wc-ajax = get_refreshed_fragments High CPU Usage (Disable AJAX Cart Fragments)
- How to quickly delete all commands (orders) in WooCommerce [sql tips]
- Cum debifam implicit “Ship to different address” din pagina de Checkout a Woocommerce
For WooCommerce some online payments modules offer automatic support for setting the limit amount from which an order can be made.
This function is useful for online stores that sell products with low prices, which cannot cover processing and shipping costs.