Function epl_format_amount
Returns a nicely formatted amount.
Package: EPL\Functions\Formatting
Copyright: Copyright (c) 2020, Merv Barrett
License: GNU Public License
Since: 1.0.0
Since: 3.4.28 $preserve_format param added.
Since: 3.4.44 Fixed warning for strpos when amount is empty.
Located at lib/includes/formatting.php
Copyright: Copyright (c) 2020, Merv Barrett
License: GNU Public License
Since: 1.0.0
Since: 3.4.28 $preserve_format param added.
Since: 3.4.44 Fixed warning for strpos when amount is empty.
Located at lib/includes/formatting.php
Parameters summary
string |
$amount |
Price amount to format. |
boolean |
$decimals = false |
Whether or not to use decimals. Useful when set to false for non-currency numbers. |
boolean |
$preserve_format = false |
Whether to preserve amount format ie int / floats. |
Return value summary
string
|
$amount Newly formatted amount or Price Not Available |