get_lifterlms_currency_symbol( string $currency = '' )
Get Currency Symbol text code
Parameters Parameters
- $currency
-
(string) (Optional) Currency Code.
Default value: ''
Return Return
(string)
Source Source
File: includes/functions/llms.functions.currency.php
function get_lifterlms_currency_symbol( $currency = '' ) {
if ( ! $currency ) {
$currency = get_lifterlms_currency();
}
$symbols = llms_get_currency_symbols();
$currency_symbol = isset( $symbols[ $currency ] ) ? $symbols[ $currency ] : $currency;
/**
* Filters the symbol for the specified currency
*
* @since Unknown
*
* @param string $currency_symbol Currency symbol. If the symbol contains non-Latin characters, the HTML entity code for those characters will be used.
* @param string $currency Currency code.
*/
return apply_filters( 'lifterlms_currency_symbol', $currency_symbol, $currency );
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 5.0.0 | Retrieve symbols list from llms_get_currency_symbols(). If a symbol cannot be found for the supplied currency code, return the code instead of an empty string. |
| 3.30.3 | Introduced. |