a:3:{s:15:"after_paragraph";a:0:{}s:10:"everywhere";a:0:{}s:11:"frontend_cl";a:1:{i:0;a:12:{s:2:"id";i:1797;s:5:"title";s:29:"Minimum Order Amount ($50.00)";s:4:"code";s:1038:"/**
 * Set a minimum order amount for checkout
 */
add_action( 'woocommerce_checkout_process', 'wc_minimum_order_amount' );
add_action( 'woocommerce_before_cart' , 'wc_minimum_order_amount' );
 
function wc_minimum_order_amount() {
    // Set this variable to specify a minimum order value
    $minimum = 50;

    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' 
            );

        }
    }
}";s:9:"code_type";s:3:"php";s:8:"location";s:11:"frontend_cl";s:11:"auto_insert";i:1;s:13:"insert_number";i:1;s:9:"use_rules";b:0;s:5:"rules";a:0:{}s:8:"priority";i:10;s:14:"location_extra";s:0:"";s:20:"shortcode_attributes";a:0:{}}}}