diff --git a/classes/product.class.php b/classes/product.class.php index 8186ba9d09e..388608a6609 100644 --- a/classes/product.class.php +++ b/classes/product.class.php @@ -514,7 +514,7 @@ class woocommerce_product { } /** Returns the price (excluding tax) - ignores tax_class filters since the price may *include* tax and thus needs subtracting */ - function get_price_excluding_tax( $round = true ) { + function get_price_excluding_tax() { $price = $this->price; @@ -524,15 +524,9 @@ class woocommerce_product { $tax_rates = $_tax->get_shop_base_rate( $this->tax_class ); - if ($round) : - $taxes = $_tax->calc_tax( $price, $tax_rates, true ); - $tax_amount = $_tax->get_tax_total( $taxes ); - $price = round( $price - $tax_amount, 2); - else : - $taxes = $_tax->calc_tax( $price, $tax_rates, true ); - $tax_amount = array_sum( $taxes ); - $price = $price - $tax_amount; - endif; + $taxes = $_tax->calc_tax( $price, $tax_rates, true ); + $tax_amount = $_tax->get_tax_total( $taxes ); + $price = round( $price - $tax_amount, 2); endif;