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:
Diego 2014-10-31 17:52:24 +00:00
parent 591086eb9b
commit 9c3309c565
1 changed files with 3 additions and 1 deletions

View File

@ -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);
}
/**