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

Roundup converted prices

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 would like to know if there is a way to roundup the prices that are converted from the main currency of the website.

For example: 100 USD to 94 EUR make it 95EUR

Thank you

Pat

Hello Pat

Read  this  please - https://currency-switcher.com/hook/woocs_raw_woocommerce_price/  AND  https://currency-switcher.com/hook/woocs_woocommerce_variation_prices/

Hello,

Would there be a code to round up to the next 5 or 10? like 93 to 95 or 107 to 110?

Also, this will impact only the converted currencies not the set up price, correct?

Thank you for your support

Pat

Hello Pat

Read  this - https://stackoverflow.com/questions/4133859/round-up-to-nearest-multiple-of-five-in-php

This hook works with all currencies.

To limit rounding for the base currency:

global $WOOCS;

if ($WOOCS->current_currency != $WOOCS->default_currency){

//do round

}

 

Hello,

Sorry for the confusion, I actually want only the converted currencies to be rounded and the base currency to stay the same as I set it for each product.

Thanks again

Pat

Ok! this code - https://share.pluginus.net/image/i20221026084410.png

Okay noted.

One last question, where do I input these codes? And do I need to remove any existing ones?

Sorry I am a beginner.

Thanks

Pat

Hello Pat

If you don't have programming experience, you'd be better off hiring a developer

Read  this  please - https://developer.wordpress.org/reference/functions/add_filter/  and  https://www.wpbeginner.com/glossary/hooks/