Merge pull request #29913 from woocommerce/revert-28335-fix/28008

Revert "Fix filter woocommerce_shipping_rate_cost backwards compatibility"
This commit is contained in:
Christopher Allford 2021-05-14 14:45:57 -07:00 committed by GitHub
commit 670b833a87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 6 deletions

View File

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