Replies: 0
When using fixed discount – regarding the discounts displayed per item in the cart – the hundredths issue (floating point) is not showing when the hundredths position is a zero.
We were able to remedy this by modifying code at 256 and 347 of woocommerce-bulk-discount.php. The addition of number_format($coeff, 2) for the second to last mention of $coeff fixed the issue
$bulk_info = sprintf( __( ‘Incl. %s discount’, ‘wc_bulk_discount’ ), ( $discount_type == ‘flat’ || $discount_type == ‘fixed’ ? get_woocommerce_currency_symbol() . number_format($coeff, 2) : ( round( ( 1 – $coeff ) * 100, 2 ) . “%” ) ) );
Would it be possible to add this number_format($coeff, 2) in future releases of the plugin? Or would it negatively impact the plugin somehow.
Love the plugin – just wanted to suggest this tweak.