Rounding 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 pleaseIf 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.
Quote from Amadeusz on December 12, 2025, 00:16Hi,
I’m trying to automatically round all product prices in my WooCommerce store to whole numbers. I’ve already tried the solutions from the documentation, but none of them seem to work correctly in my setup.
Could you please provide a safe code snippet that I can add to my
functions.phpfile to achieve proper price rounding?
Hi,
I’m trying to automatically round all product prices in my WooCommerce store to whole numbers. I’ve already tried the solutions from the documentation, but none of them seem to work correctly in my setup.
Could you please provide a safe code snippet that I can add to my functions.php file to achieve proper price rounding?
Quote from Alex Dovlatov on December 12, 2025, 15:29Hello
To round all prices to whole numbers, add this code to your theme's
functions.phpfile:// Round all converted prices to whole numbers add_filter('woocs_exchange_value', function($price) { return round($price, 0); }, 9999);Alternative options:
If you want to always round UP (to avoid losing profit):
add_filter('woocs_exchange_value', function($price) { return ceil($price); }, 9999);Or round to nearest 5 or 10 for cleaner prices:
// Round to nearest 5 (23.4 → 25) add_filter('woocs_exchange_value', function($price) { return round($price / 5) * 5; }, 9999);Important: Clear all caches (site cache, page cache, browser cache) after adding the code.
Read also: https://currency-switcher.com/search?s=round
Let me know if this works for you!
Hello
To round all prices to whole numbers, add this code to your theme's functions.php file:
// Round all converted prices to whole numbers
add_filter('woocs_exchange_value', function($price) {
return round($price, 0);
}, 9999);Alternative options:
If you want to always round UP (to avoid losing profit):
add_filter('woocs_exchange_value', function($price) {
return ceil($price);
}, 9999);Or round to nearest 5 or 10 for cleaner prices:
// Round to nearest 5 (23.4 → 25)
add_filter('woocs_exchange_value', function($price) {
return round($price / 5) * 5;
}, 9999);Important: Clear all caches (site cache, page cache, browser cache) after adding the code.
Read also: https://currency-switcher.com/search?s=round
Let me know if this works for you!
Quote from Amadeusz on December 13, 2025, 14:25Hello,
unfortunately, this solution does not work on our side.
You can see the issue here:
https://srv94019.seohost.com.pl/kategoria-produktu/rozwiazania-holograficzne/Prices are still not being rounded as expected after adding the code and clearing all caches.
Please let me know what else we can check or adjust.
Hello,
unfortunately, this solution does not work on our side.
You can see the issue here:
https://srv94019.seohost.com.pl/kategoria-produktu/rozwiazania-holograficzne/
Prices are still not being rounded as expected after adding the code and clearing all caches.
Please let me know what else we can check or adjust.
Quote from Alex Dovlatov on December 15, 2025, 12:44Hello
Ok, lets review this link https://srv94019.seohost.com.pl/produkt/box/ - prices are 5,399.00 zł – 33,899.00 zł - how do you want to round them, describe please by links and prices desription (how is, and how to be)
As it stage site you can share wp-admin acess there in the private access of this ticket
https://share.pluginus.net/image/i20230222134241.png
https://share.pluginus.net/image/i20230222134615.png
https://share.pluginus.net/image/i20230222134511.png
Hello
Ok, lets review this link https://srv94019.seohost.com.pl/produkt/box/ - prices are 5,399.00 zł – 33,899.00 zł - how do you want to round them, describe please by links and prices desription (how is, and how to be)
As it stage site you can share wp-admin acess there in the private access of this ticket
https://share.pluginus.net/image/i20230222134241.png
https://share.pluginus.net/image/i20230222134615.png
https://share.pluginus.net/image/i20230222134511.png
Quote from Amadeusz on December 16, 2025, 12:29Hello,
Thank you for the details.
To clarify, the PLN prices are not rounded by any rule or conversion — they are manually set as fixed, already rounded values, and they are correct as they are.
The issue appears only when switching the currency in the top-right corner:
Current situation
PLN → prices are fixed and intentionally set (not rounded automatically)
USD / EUR → prices are calculated by direct conversion and therefore are not rounded
Expected behavior
PLN → no change
USD / EUR → apply rounding rules after conversion so the prices display as clean, rounded values
Once rounding is applied for foreign currencies, pricing will be consistent and more user-friendly.
We can share wp-admin access to the staging site via the private section of this ticket if needed.
Hello,
Thank you for the details.
To clarify, the PLN prices are not rounded by any rule or conversion — they are manually set as fixed, already rounded values, and they are correct as they are.
The issue appears only when switching the currency in the top-right corner:
Current situation
PLN → prices are fixed and intentionally set (not rounded automatically)
USD / EUR → prices are calculated by direct conversion and therefore are not rounded
Expected behavior
PLN → no change
USD / EUR → apply rounding rules after conversion so the prices display as clean, rounded values
Once rounding is applied for foreign currencies, pricing will be consistent and more user-friendly.
We can share wp-admin access to the staging site via the private section of this ticket if needed.
Quote from Alex Dovlatov on December 17, 2025, 12:50Hello
Looks like my bad, wrong hooks, I just added to functions.php file ( https://srv94019.seohost.com.pl/wp-admin/theme-editor.php?file=functions.php&theme=astra ):
add_filter('woocs_raw_woocommerce_price', function($price) {
return round($price, 0);
});add_filter('woocs_woocommerce_variation_prices', function($price) {
return round($price, 0);
});And its works, for example: https://srv94019.seohost.com.pl/produkt/box/ please check it "1,496.00$ – 9,392.00$"
Hello
Looks like my bad, wrong hooks, I just added to functions.php file ( https://srv94019.seohost.com.pl/wp-admin/theme-editor.php?file=functions.php&theme=astra ):
add_filter('woocs_raw_woocommerce_price', function($price) {
return round($price, 0);
});
add_filter('woocs_woocommerce_variation_prices', function($price) {
return round($price, 0);
});
And its works, for example: https://srv94019.seohost.com.pl/produkt/box/ please check it"1,496.00$ – 9,392.00$"
Quote from Amadeusz on December 17, 2025, 13:37Thank you!
You should consider adding this option to the plugin.
Thank you!
You should consider adding this option to the plugin.