From e6530a3555831a2de17503364a74685235d2bd41 Mon Sep 17 00:00:00 2001 From: Joel Rowley Date: Thu, 7 Sep 2017 21:34:58 -0400 Subject: [PATCH] Bugfix: wc_remove_number_precision() indirectly called twice from get_discount() --- includes/class-wc-discounts.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-wc-discounts.php b/includes/class-wc-discounts.php index 5a608ecb8bf..c6a70c10f67 100644 --- a/includes/class-wc-discounts.php +++ b/includes/class-wc-discounts.php @@ -131,7 +131,7 @@ class WC_Discounts { */ public function get_discount( $key, $in_cents = false ) { $item_discount_totals = $this->get_discounts_by_item( $in_cents ); - return isset( $item_discount_totals[ $key ] ) ? ( $in_cents ? $item_discount_totals[ $key ] : wc_remove_number_precision( $item_discount_totals[ $key ] ) ) : 0; + return isset( $item_discount_totals[ $key ] ) ? $item_discount_totals[ $key ] : 0; } /**