diff --git a/lib/internal/Magento/Framework/Setup/Lists.php b/lib/internal/Magento/Framework/Setup/Lists.php index ce0dd8348acc3..b437969c0af09 100644 --- a/lib/internal/Magento/Framework/Setup/Lists.php +++ b/lib/internal/Magento/Framework/Setup/Lists.php @@ -21,12 +21,20 @@ class Lists */ protected $allowedLocales; + /** + * List of allowed currencies + * + * @var array + */ + protected $allowedCurrencies; + /** * @param ConfigInterface $localeConfig */ public function __construct(ConfigInterface $localeConfig) { $this->allowedLocales = $localeConfig->getAllowedLocales(); + $this->allowedCurrencies = $localeConfig->getAllowedCurrencies(); } /** @@ -64,6 +72,10 @@ public function getCurrencyList() $currencies = (new CurrencyBundle())->get(Resolver::DEFAULT_LOCALE)['Currencies']; $list = []; foreach ($currencies as $code => $data) { + $isAllowedCurrency = array_search($code, $this->allowedCurrencies) !== false; + if (!$isAllowedCurrency) { + continue; + } $list[$code] = $data[1] . ' (' . $code . ')'; } asort($list);