Skip to main content

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 keeping 10.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.

F. C.

Would love to have those options in core, +1!