get_woocommerce_currency_symbol( string $currency = '' )

Get Currency symbol.


Description Description

Currency symbols and names should follow the Unicode CLDR recommendation (http://cldr.unicode.org/translation/currency-names)


Parameters Parameters

$currency

(Optional) Currency. (default: '').

Default value: ''


Top ↑

Return Return

(string)


Top ↑

Source Source

File: includes/wc-core-functions.php

function get_woocommerce_currency_symbol( $currency = '' ) {
	if ( ! $currency ) {
		$currency = get_woocommerce_currency();
	}

	$symbols = get_woocommerce_currency_symbols();

	$currency_symbol = isset( $symbols[ $currency ] ) ? $symbols[ $currency ] : '';

	return apply_filters( 'woocommerce_currency_symbol', $currency_symbol, $currency );
}


Top ↑

User Contributed Notes User Contributed Notes

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