Currency::get_currency_name( string $code )
Return the currency name to use as defined in the currency map.
Contents
Parameters
- $code
-
(string) (Required) The currency 3-letter code.
Return
(string)
Source
File: src/Tickets/Commerce/Utils/Currency.php
public static function get_currency_name( $code ) {
$map = static::get_default_currency_map();
$name = '';
if ( isset( $map[ $code ] ) ) {
$name = $map[ $code ]['name'];
}
/**
* Filter the specific currency name before returning. $code is the 3-letter currency code.
*
* @since 5.3.0
*
* @param string $name The currency name.
*
* @return string
*/
$name = apply_filters( "tec_tickets_commerce_currency_{$code}_name", $name );
/**
* Filter all currency symbols before returning.
*
* @since 5.3.0
*
* @param string $name The currency name.
*
* @return string
*/
return apply_filters( 'tec_tickets_commerce_currency_name', $name );
}
Changelog
| Version | Description |
|---|---|
| 5.3.0 | Introduced. |