get_lifterlms_currency_symbol( string $currency = '' )

Get Currency Symbol text code


Parameters Parameters

$currency

(string) (Optional) Currency Code.

Default value: ''


Top ↑

Return Return

(string)


Top ↑

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 );
}


Top ↑

Changelog 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.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.