WooCommerce: Set Minimum Checkout Order Amount

Shop managers sometimes need to set a mimimum checkout order amount before customers can purchase items.

This code snippet allows you to programatically set a minimum checkout order amount, which is checked before a customer places an order.

It outputs a customisable error message to the screen, stopping the checkout process until more products are added to the cart, and the cart total is above the set minimum amount.

woocommerce setminimum checkout order amount

Where To Put The Code Snippet?

This code snippet should go in your active theme’s functions.php file.

Add it to the bottom of the file, before any closing ?> characters.

It’s always a good idea to take a backup of your functions.php file in case anything goes wrong – you can just copy the old code back in again.

Are You New To WooCommerce?

If you haven’t yet started to build an email list of your WooCommerce shop customers, now is the best time to get started.

Was this article helpful?

Keep In Touch


Wil is a dad, WordPress consultant, WordPress developer, business coach and mentor. He co-organizes the WordPress Sydney meetup group and has been on the organising committee for WordCamp Sydney since 2014. He speaks at many special events and contributes to the WordPress open source project. His likes are chillies, craft beer and electrogravitics.

Leave a Comment

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