Find tax rate fix
This commit is contained in:
parent
5ef6a824fe
commit
33706cc1fb
|
@ -79,6 +79,8 @@ class woocommerce_tax {
|
|||
|
||||
$rate['rate'] = 0;
|
||||
|
||||
$tax_class = sanitize_title($tax_class);
|
||||
|
||||
if (isset($this->rates[ $country ][ $state ])) :
|
||||
if ($tax_class) :
|
||||
if (isset($this->rates[ $country ][ $state ][$tax_class])) :
|
||||
|
@ -190,9 +192,9 @@ class woocommerce_tax {
|
|||
// Loop cart and find the highest tax band
|
||||
if (sizeof($woocommerce->cart->get_cart())>0) : foreach ($woocommerce->cart->get_cart() as $item) :
|
||||
|
||||
if ($item['data']->tax_class) :
|
||||
if ($item['data']->get_tax_class()) :
|
||||
|
||||
$found_rate = $this->find_rate( $country, $state, $item['data']->tax_class );
|
||||
$found_rate = $this->find_rate( $country, $state, $item['data']->get_tax_class() );
|
||||
|
||||
$found_rates[] = $found_rate['rate'];
|
||||
|
||||
|
|
Loading…
Reference in New Issue