Skip to content

Instantly share code, notes, and snippets.

Forked from woogist/functions.php
Created November 13, 2013 14:58
What would you like to do?
add_action( 'woocommerce_checkout_process', 'wc_minimum_order_amount' );
function wc_minimum_order_amount() {
global $woocommerce;
$minimum = 10;
if ( $woocommerce->cart->get_cart_total(); < $minimum ) {
$woocommerce->add_error( sprintf( 'You must have an order with a minimum of %s to place your order.' , $minimum ) );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment