Tribe__Tickets__Commerce__Currency::get_symbols_for_codes( array|string $codes )
Returns a map of 3-letter currency codes and their unescaped symbol.
Contents
Parameters
- $codes
-
(array|string) (Required) A currency 3-letter code or a list of them.
Return
(array) A map of currency 3-letter codes to their symbols; shape [ => <symbol> ], e.g. [ USD => '$' ]
Source
File: src/Tribe/Commerce/Currency.php
public function get_symbols_for_codes( $codes ) {
$codes = (array) $codes;
$symbols = array();
foreach ( $this->currency_code_options_map as $code => $data ) {
if ( ! in_array( $code, $codes, true ) ) {
continue;
}
$symbols[ $code ] = $data['symbol'];
}
return $symbols;
}
Changelog
| Version | Description |
|---|---|
| 4.8 | Introduced. |