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

Possible to round up decimal?

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.

Dear People

Is it possible to set up, that the amounts will round up or round down after the comma?

Regards,

Simon

Hello Simon

Yes, read please next:

 

Dear Pablo

Thank You for those links.

If i like to round up at all to the next"unit", let's say we have a price of Euro 17.61 - it should be Euro 18.00. Is this possible?

Regards,

Simon

Hello Simon

Yes, you need to use PHP function ceil https://www.w3schools.com/php/func_math_ceil.asp

Example:

add_filter('woocs_raw_woocommerce_price', function($price) {

    return ceil($price);

});