Skip to content

Commit 6449fc9

Browse files
committed
MCP-288: [Load Cart Section] Replace Zend_Currency component with Intl NumberFormatter
- Get currency code by locale in Numberformatter;
1 parent 14f2457 commit 6449fc9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/code/Magento/Directory/Model/Currency.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ private function formatCurrency(string $price, array $options): string
410410
$this->setOptions($options);
411411

412412
$formattedCurrency = $this->numberFormatter->formatCurrency(
413-
$price, $this->getCode() ?? LocaleCurrency::DEFAULT_CURRENCY
413+
$price, $this->getCode() ?? $this->numberFormatter->getTextAttribute(\NumberFormatter::CURRENCY_CODE)
414414
);
415415

416416
if (array_key_exists(LocaleCurrency::CURRENCY_OPTION_DISPLAY, $options)

0 commit comments

Comments
 (0)