Add a native option to hide decimals for whole-number prices
FluentCart should include a native price-display setting under Store Settings β Currency / Number Format to control how decimal places are displayed.
Suggested options:
- Always show two decimal places:
10.00 - Hide decimals only for whole-number prices:
10, while keeping10.50 - Optionally trim all trailing zeros
This setting should apply consistently across the storefront, product pages, cart, checkout, customer dashboard, emails, receipts and PDF invoices.
At present, displaying 10β¬ instead of 10.00β¬ requires adding the following PHP filter:
add_filter('fluent_cart/hide_unnecessary_decimals', '__return_true');
This is a basic currency-formatting preference and should not require merchants to install a snippets plugin or maintain custom PHP code.
Additionally, in our testing the current filter changed a value such as 12.10β¬ into 12.1β¬, although the documentation suggests that meaningful decimal places should be preserved. The desired behaviour is:
10.00β¬β10β¬10.50β¬β10.50β¬12.10β¬β12.10β¬
A native selector would make the behaviour clearer, safer and more consistent for non-technical store owners, especially in European stores where currency-formatting conventions matter.
Would love to have those options in core, +1!
