Skip to content

Instantly share code, notes, and snippets.

@claudiosanches
Forked from woogist/functions.php
Created November 13, 2013 14:58
Show Gist options
  • Save claudiosanches/7450444 to your computer and use it in GitHub Desktop.
Save claudiosanches/7450444 to your computer and use it in GitHub Desktop.

Revisions

  1. WooThemes created this gist Oct 10, 2013.
    9 changes: 9 additions & 0 deletions functions.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    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 ) );
    }
    }