Force taxes to display/calculate for customer location

This commit is contained in:
Mike Jolley 2014-12-23 22:07:27 +00:00
parent 4e8e90a8de
commit 896ccb1b88
1 changed files with 2 additions and 2 deletions

View File

@ -337,9 +337,9 @@ class WC_Tax {
public static function get_tax_location( $tax_class = '' ) {
$location = array();
if ( defined( 'WOOCOMMERCE_CHECKOUT' ) || ( ! empty( WC()->customer ) && WC()->customer->has_calculated_shipping() ) ) {
if ( ! empty( WC()->customer ) ) {
$location = WC()->customer->get_taxable_address();
} elseif ( wc_prices_include_tax() || get_option( 'woocommerce_default_customer_address' ) == 'base' ) {
} elseif ( wc_prices_include_tax() || 'base' === get_option( 'woocommerce_default_customer_address' ) ) {
$location = array(
WC()->countries->get_base_country(),
WC()->countries->get_base_state(),