| @@ -28,9 +28,9 @@ | ||
| 28 | 28 | if ( ! function_exists( 'tptParseOptionText' ) ) { |
| 29 | 29 | function tptParseOptionText( $text, $quantity, $discount = null, $base_unit_name = null ) { |
| 30 | 30 | return strtr( $text, array( |
| 31 | 31 | '{tp_quantity}' => $quantity, |
| 32 | - '{tp_discount}' => $discount, | |
| 32 | + '{tp_discount}' => ! is_null( $discount ) ? round( (float) $discount, \TierPricingTable\PricingTable::discountDecimals( (float) $discount ) ) : $discount, | |
| 33 | 33 | '{tp_rounded_discount}' => ! is_null( $discount ) ? round( $discount ) : 0, |
| 34 | 34 | '{tp_base_unit_name}' => $base_unit_name, |
| 35 | 35 | ) ); |
| 36 | 36 | } |