epl_format_amount

Returns a nicely formatted amount.

Since
1.0.0
3.4.28 $preserve_format param added.
3.4.44 Fixed warning for strpos when amount is empty.
Parameters
string $amount

Price amount to format.

#
bool $decimals = false

Whether or not to use decimals. Useful when set to false for non-currency numbers.

#
bool $preserve_format = false

Whether to preserve amount format ie int / floats.

#
Returns
string

$amount Newly formatted amount or Price Not Available