From a25c098bf0aeec0fd2734235e40fd56505c6e188 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Sun, 22 Jan 2012 02:35:46 +0000 Subject: [PATCH] Removed rounding argument as it does nothing --- classes/product.class.php | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) 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;