Skip to content

Ugandan Shilling (UGX) is a zero decimal currency #883

Description

@jpknz

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.

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
		);
	}

  • Issue assigned to next milestone.
  • Issue assigned a priority (will be assessed by maintainers).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions