forked from DevinVinson/WordPress-Plugin-Boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 1
Currency functions
Moisés Barrachina Planelles edited this page Oct 4, 2023
·
2 revisions
Backend Frontend Template provides several functions about currencies:
Returns a currency list with all the data, including the numer of currency on the ISO 4217 standard
$currencies_name_and_symbol = [
'ARS' => [
'id' => 'ARS',
'name' => 'Argentina Peso',
'symbol' => '$',
'code' => '032',
],
'AWG' => [
'id' => 'AWG',
'name' => 'Aruba Guilder',
'symbol' => 'ƒ',
'code' => '533',
],
[...]
Returns a currency list
$currencies_name_and_symbol = [
'ALL' => 'L - Albania Lek',
'AFN' => '؋ Afghanistan Afghani',
'ARS' => '$ Argentina Peso',
'AWG' => 'ƒ Aruba Guilder',
[...]
Returns the currency symbol through the currency code
Returns the ISO 4217 number through the currency id