Bugfix: wc_remove_number_precision() indirectly called twice from get_discount()

This commit is contained in:
Joel Rowley 2017-09-07 21:34:58 -04:00
parent f6e8ed2090
commit e6530a3555
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}
/**