Added filter to alter base tax rates
The filter will come useful in international shops which have more than one branch/base shop and require higher flexibility in tax calculation.
This commit is contained in:
parent
591086eb9b
commit
9c3309c565
|
@ -352,13 +352,15 @@ class WC_Tax {
|
|||
* @return array
|
||||
*/
|
||||
public static function get_shop_base_rate( $tax_class = '' ) {
|
||||
return self::find_rates( array(
|
||||
$rates = self::find_rates( array(
|
||||
'country' => WC()->countries->get_base_country(),
|
||||
'state' => WC()->countries->get_base_state(),
|
||||
'postcode' => WC()->countries->get_base_postcode(),
|
||||
'city' => WC()->countries->get_base_city(),
|
||||
'tax_class' => $tax_class
|
||||
) );
|
||||
|
||||
return apply_filters('wocommerce_tax_shop_base_rates', $rates, $tax_class);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue