Tribe__Tickets__Commerce__Currency::get_currency_locale( string $key, string $currency_code = null )
Returns a locale information associated with the current currency or the specified one.
Contents
Parameters
- $key
-
(string) (Required)
- $currency_code
-
(string) (Optional)
Default value: null
Return
(string)
Source
File: src/Tribe/Commerce/Currency.php
public function get_currency_locale( $key, $currency_code = null ) {
$currency_code = null === $currency_code ? $this->currency_code : strtoupper( $currency_code );
$default = reset( $this->currency_code_options_map );
$currency_data = Tribe__Utils__Array::get( $this->currency_code_options_map, $currency_code, $default );
return Tribe__Utils__Array::get( $currency_data, $key, '' );
}
Changelog
| Version | Description |
|---|---|
| 4.7 | Introduced. |