Merge pull request #29913 from woocommerce/revert-28335-fix/28008
Revert "Fix filter woocommerce_shipping_rate_cost backwards compatibility"
This commit is contained in:
commit
670b833a87
|
@ -82,13 +82,7 @@ class WC_Tax {
|
|||
* @return array
|
||||
*/
|
||||
public static function calc_shipping_tax( $price, $rates ) {
|
||||
// Backwards compatible from WC_Shipping_Rate::get_cost().
|
||||
if ( has_filter( 'woocommerce_shipping_rate_cost' ) ) {
|
||||
$rate = new WC_Shipping_Rate();
|
||||
$price = $rate->get_cost();
|
||||
}
|
||||
$taxes = self::calc_exclusive_tax( $price, $rates );
|
||||
|
||||
return apply_filters( 'woocommerce_calc_shipping_tax', $taxes, $price, $rates );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue