UGX to be returned as a zero decimal currency.
UGX is not returned as a zero decimal currency.
public static function no_decimal_currencies() {
return array(
'bif', // Burundian Franc
'djf', // Djiboutian Franc
'jpy', // Japanese Yen
'krw', // South Korean Won
'pyg', // Paraguayan Guaraní
'vnd', // Vietnamese Đồng
'xaf', // Central African Cfa Franc
'xpf', // Cfp Franc
'clp', // Chilean Peso
'gnf', // Guinean Franc
'kmf', // Comorian Franc
'mga', // Malagasy Ariary
'rwf', // Rwandan Franc
'vuv', // Vanuatu Vatu
'xof', // West African Cfa Franc
'ugx', // Ugandan Shilling
);
}
What I expected
UGX to be returned as a zero decimal currency.
What happened instead
UGX is not returned as a zero decimal currency.
See https://stripe.com/docs/currencies#presentment-currencies which shows UGX as a zero decimal currency.
class-wc-stripe-helper.php has the function
no_decimal_currencies()which does not list UGX as a zero decimal currency. To fix this code needs to be updated to include ugx as below.