1 cent error calculation
-
Hi,
I’m having an issue when I try to buy two products of 10.50€. It also charge 20,99€ and not 21,00€. Can you help me on this?
I tried to use a custom code to fix the problem. In fact, it corrects the value that it presents but does not correct the amount charged.
This is the code:// Round price for .99 .01 decimals
add_filter( ‘raw_woocommerce_price’, function ( $price ) {
$decimals = round( $price – floor( $price ), 2 );return ( $decimals == 0.01 || $decimals == 0.99 ) ? round( $price ) : $price;
} );I’m out of solutions…
The page I need help with: [log in to see the link]
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘1 cent error calculation’ is closed to new replies.