/** * {@inheritdoc} */ public function addMissingPrices(ProductValueInterface $value) { $activeCurrencyCodes = $this->currencyRepository->getActivatedCurrencyCodes(); if (AttributeTypes::PRICE_COLLECTION === $value->getAttribute()->getAttributeType()) { $prices = $value->getPrices(); foreach ($activeCurrencyCodes as $currencyCode) { if (null === $value->getPrice($currencyCode)) { $this->addPriceForCurrency($value, $currencyCode); } } foreach ($prices as $price) { if (!in_array($price->getCurrency(), $activeCurrencyCodes)) { $value->removePrice($price); } } } return $value; }