Does your minimum order amount not include shipping+tax? Here’s the WooCommerce code.

If you run a WooCommerce store and require a minimum order amount before the customer can check out, you may have come across the WooCommerce documentation that includes code for this requirement. It turns out, this code includes shipping and tax in the “order total.” If you require a minimum order amount for the subtotal only, you’ll need slightly different code.

Here’s the code you’ll want to use in your functions.php code instead:

This code will ensure that the customers are meeting that minimum with just the price of the products they’re purchasing.

Different companies have different requirements and you can choose which is best for you. Despite Woo’s documentation only showing the ‘complete total’ code, I would recommend going the subtotal route instead┬ásince you’re not benefiting from shipping and tax fees.

Leave a comment:

Your email address will not be published. Required fields are marked *

Back To Posts