Problem with rounding / calulated total filter
-
Hello, we have the problem with a customer’s shop that we cannot round off the prices in combination with your plugin. We have implemented the following function:
add_filter( 'woocommerce_calculated_total', 'my_custom_roundoff' ); function my_custom_roundoff( $total ) { $round_num = round($total / 0.05) * 0.05; $total = number_format($round_num, 2); // this is required for showing zero in the last decimal return $total; }
If now on the checkout page a payment method is selected where charges apply, all payment methods disappear, except for Paypal and invoice. After the disappearance, Paypal is selected.
If we deactivate the plugin (or don’t round the total), everything works. Now we would be extremely grateful for an appropriate update or assistance.
Thank you =)
The page I need help with: [log in to see the link]
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Problem with rounding / calulated total filter’ is closed to new replies.