pfc101
Forum Replies Created
-
Thanks for the code, however, it broke my site and after digging to find out the issue.
It was showing an error on the line marked with ***…***. (Unexpected T_Function)Any ideas?
Thank you
add_action(‘woocommerce_before_cart’, ‘warp_minimum_order_amount’);
add_action(‘woocommerce_before_checkout_form’, ‘warp_minimum_order_amount’);*** function warp_minimum_order_amount() { ***
// Set this variable to specify a minimum order value
$minimum = 20;
if(is_wallet_rechargeable_cart()){
return;
}if (WC()->cart->subtotal < $minimum) {
if (is_cart() || is_checkout()) {
wc_print_notice(
sprintf(esc_html__(‘Your current order total is %s — you must have an order with a minimum of %s to place your order’, ‘your text domain’),
wc_price(WC()->cart->subtotal),
wc_price($minimum)
), ‘error’
);
}
}
}add_action(‘woocommerce_checkout_process’, function() {
// Set this variable to specify a minimum order value
$minimum = 20;
if(is_wallet_rechargeable_cart()){
return;
}
if (WC()->cart->subtotal < $minimum) {
throw new Exception(sprintf(esc_html__(‘Your current order total is %s — you must have an order with a minimum of %s to place your order’, ‘your text domain’),
wc_price(WC()->cart->subtotal),
wc_price($minimum)
));
}
});Forum: Themes and Templates
In reply to: [Enigma] Responsive Toggle Menu IssueFound the problem, it was a plugin issue