diff --git a/Observer/UpdateProductStockData.php b/Observer/UpdateProductStockData.php index 6ad169d..de7b37d 100644 --- a/Observer/UpdateProductStockData.php +++ b/Observer/UpdateProductStockData.php @@ -89,8 +89,8 @@ public function execute(Observer $observer) $stock = $this->stockResolver->execute(SalesChannelInterface::TYPE_WEBSITE, $websiteCode); $stockId = $stock->getStockId(); - $stockItemActual = $this->getStockItemConfiguration->execute($product->getSku(), $stockId); - $salableQty = $this->productSalableQty->execute($product->getSku(), $stockId); + $stockItemActual = $this->getStockItemConfiguration->execute($product->getData('sku'), $stockId); + $salableQty = $this->productSalableQty->execute($product->getData('sku'), $stockId); /** @var \Magento\CatalogInventory\Model\Stock\Item $stockItem */ $stockItem = $product->getExtensionAttributes()->getStockItem();