diff --git a/vendor/magento/module-gift-card/Ui/DataProvider/Product/Form/Modifier/GiftCard.php b/vendor/magento/module-gift-card/Ui/DataProvider/Product/Form/Modifier/GiftCard.php index a1a9f8e1a2ae..b7f03089b7b1 100644 --- a/vendor/magento/module-gift-card/Ui/DataProvider/Product/Form/Modifier/GiftCard.php +++ b/vendor/magento/module-gift-card/Ui/DataProvider/Product/Form/Modifier/GiftCard.php @@ -22,8 +22,6 @@ use Magento\Ui\Component\Form\Element\Select; use Magento\Ui\Component\Form\Element\Checkbox; use Magento\Store\Model\ScopeInterface; -use Magento\Framework\App\ObjectManager; -use Magento\Framework\Locale\CurrencyInterface; /** * Data provider for Gift Cards @@ -78,11 +76,6 @@ class GiftCard extends AbstractModifier */ protected $storeManager; - /** - * @var CurrencyInterface - */ - private $currency; - /** * @var array */ @@ -100,7 +93,6 @@ class GiftCard extends AbstractModifier * @param DirectoryHelper $directoryHelper * @param EmailTemplateFactory $emailTemplateFactory * @param StoreManagerInterface $storeManager - * @param CurrencyInterface $currency */ public function __construct( LocatorInterface $locator, @@ -108,8 +100,7 @@ public function __construct( ScopeConfigInterface $scopeConfig, DirectoryHelper $directoryHelper, EmailTemplateFactory $emailTemplateFactory, - StoreManagerInterface $storeManager, - CurrencyInterface $currency = null + StoreManagerInterface $storeManager ) { $this->locator = $locator; $this->arrayManager = $arrayManager; @@ -117,7 +108,6 @@ public function __construct( $this->directoryHelper = $directoryHelper; $this->emailTemplateFactory = $emailTemplateFactory; $this->storeManager = $storeManager; - $this->currency = $currency ?: ObjectManager::getInstance()->get(CurrencyInterface::class); } /** @@ -829,24 +819,4 @@ protected function getCurrencySymbol() { return $this->storeManager->getStore()->getBaseCurrency()->getCurrencySymbol(); } - - /** - * Format price according to the current store currency - * - * @param mixed $value - * @return mixed|string - * @throws \Zend_Currency_Exception - */ - protected function formatPrice($value) - { - $store = $this->locator->getStore(); - if ($store->getId() !== null) { - $currency = $this->currency->getCurrency($store->getBaseCurrencyCode()); - $value = $currency->toCurrency($value, ['display' => \Magento\Framework\Currency::NO_SYMBOL]); - } else { - $value = parent::formatPrice($value); - } - - return $value; - } }