Tax based on shipping address, and fixed outside_base function
This commit is contained in:
parent
ea42fb5c97
commit
137396fd9e
|
@ -53,7 +53,8 @@ class woocommerce_customer {
|
|||
$state = '';
|
||||
endif;
|
||||
|
||||
if ($country!==$_SESSION['customer']['country']) return true;
|
||||
if ($country!==$_SESSION['customer']['shipping_country']) return true;
|
||||
if ($state && $state!==$_SESSION['customer']['shipping_state']) return true;
|
||||
|
||||
endif;
|
||||
return false;
|
||||
|
|
|
@ -117,8 +117,8 @@ class woocommerce_tax {
|
|||
/* Checkout uses customer location, otherwise use store base rate */
|
||||
if ( defined('WOOCOMMERCE_CHECKOUT') && WOOCOMMERCE_CHECKOUT ) :
|
||||
|
||||
$country = $woocommerce->customer->get_country();
|
||||
$state = $woocommerce->customer->get_state();
|
||||
$country = $woocommerce->customer->get_shipping_country();
|
||||
$state = $woocommerce->customer->get_shipping_state();
|
||||
|
||||
$rate = $this->find_rate( $country, $state, $tax_class );
|
||||
|
||||
|
@ -160,8 +160,8 @@ class woocommerce_tax {
|
|||
global $woocommerce;
|
||||
|
||||
if (defined('WOOCOMMERCE_CHECKOUT') && WOOCOMMERCE_CHECKOUT) :
|
||||
$country = $woocommerce->customer->get_country();
|
||||
$state = $woocommerce->customer->get_state();
|
||||
$country = $woocommerce->customer->get_shipping_country();
|
||||
$state = $woocommerce->customer->get_shipping_state();
|
||||
else :
|
||||
$country = $woocommerce->countries->get_base_country();
|
||||
$state = $woocommerce->countries->get_base_state();
|
||||
|
|
|
@ -94,6 +94,7 @@ Yes you can! Join in on our GitHub repository :) https://github.com/woothemes/wo
|
|||
* Customer note field quote fix
|
||||
* Moved product-category and tag slugs to settings (page)
|
||||
* % coupon fix
|
||||
* Tax rates based on shipping address
|
||||
|
||||
= 1.3 - 01/12/2011 =
|
||||
* Minor bug fixes + localisations
|
||||
|
|
Loading…
Reference in New Issue