The Pods currency sign list is filterable, therefore unlimited.
Please add any currency you desire with the pods_form_ui_field_currency_currencies filter.
You may check pods/classes/fields/currencies.php for instance.
The filter mentioned and linked above will add any currency with any symbol and name. The filter in the same file, pods_form_ui_field_number_currency_default will also set a default.
Here is an example of the use of these filters:
<?php
/**
* Add currencies to the Pods currency field.
*
* @see https://github.com/pods-framework/pods/blob/639cfa9255bd9d110c99ccfa4712eac327e2dfd2/classes/fields/currency.php#L568-L583C16
*/
add_filter(
'pods_form_ui_field_currency_currencies',
function( $currencies ) {
/**
* Iranian Rial.
*
* @see https://en.wikipedia.org/wiki/Iranian_rial
*/
$currencies['irr'] = array(
'label' => 'ریال ایران',
'name' => 'Iranian Rial',
'sign' => '﷼',
'entity' => '﷼',
);
/**
* Monero.
*
* @see https://en.wikipedia.org/wiki/Monero
*/
$currencies['xmr'] = array(
'label' => 'Monero (XMR)',
'name' => 'Monero',
'sign' => 'XMR',
'entity' => 'XMR;',
);
return $currencies;
}
);
/**
* Set default currency for Pods currency field.
*
* @see https://github.com/pods-framework/pods/blob/639cfa9255bd9d110c99ccfa4712eac327e2dfd2/classes/fields/currency.php#L77
*/
add_filter(
'pods_form_ui_field_number_currency_default',
function( $currency_code ) {
return 'irr';
}
);The above code will add ﷼ and XMR as currencies, with ﷼ as the default.
Various other attributes of the currency definition can also be filtered; try searching apply_filters( within the linked file.
While it may seem to make sense to add all currently known international fiat currencies, of which there are around 180, there are also at least 22,932 cryptocurrencies in circulation, and as money is an imaginary social construct, there is really nothing keeping individuals from doing commerce in seashells, bananas, avocados, or futures contracts or digital coins representing these real things, or anything else.
But I digress. The main idea is that money is a made-up concept, and the above filters will allow you to redefine that concept within the Pods currency field in any way you wish.
