PluginUs.Net - Business Tools for WooCommerce and WordPress

[realize your idea - make your dreams come true]

Support Forum

You need to log-in to create request (topic) to the support

Rounding Snippet Issue

The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page please
If you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.

Hello,

I am using the following snippet to round product prices after converting the currency:

add_filter('woocs_raw_woocommerce_price', function($price) {
global $WOOCS;
$current_currency = $WOOCS->current_currency;

if ($current_currency =="USD") {
return round($price);
} else {
return $price;
}

});

However, when using a discount plugin to give 20% off for buying multiple items, the product price is discounted properly, but the product subtotal seems to be rounding a second time resulting in an incorrect product subtotal.

Any ideas as to how I can fix this?

Thank you,

David

 

Hello David

You  can  add   code:

(!is_checkout() AND !is_cart())

But then rounding won't work in the cart and  checkout  page.

Unfortunately there is no other solution