Fix for free shipping min amount
This commit is contained in:
parent
7dd4b7ce6e
commit
49d24b09aa
|
@ -113,8 +113,18 @@ class free_shipping extends woocommerce_shipping_method {
|
|||
global $woocommerce;
|
||||
|
||||
if ($this->enabled=="no") return false;
|
||||
|
||||
if (isset($woocommerce->cart->cart_contents_total)) :
|
||||
|
||||
if (isset($woocommerce->cart->cart_contents_total) && isset($this->min_amount) && $this->min_amount && $this->min_amount > $woocommerce->cart->cart_contents_total) return false;
|
||||
if ($woocommerce->cart->prices_include_tax) :
|
||||
$total = $woocommerce->cart->tax_total + $woocommerce->cart->cart_contents_total;
|
||||
else :
|
||||
$total = $woocommerce->cart->cart_contents_total;
|
||||
endif;
|
||||
|
||||
if (isset($this->min_amount) && $this->min_amount && $this->min_amount > $total) return false;
|
||||
|
||||
endif;
|
||||
|
||||
$ship_to_countries = '';
|
||||
|
||||
|
|
Loading…
Reference in New Issue