Merge pull request #16752 from hjoelr/bugfix-double-precision
Bugfix: wc_remove_number_precision() indirectly called twice from get_discount()
This commit is contained in:
commit
1f1903bcf4
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue