diff --git a/vendor/magento/module-inventory-configurable-product/Plugin/CatalogInventory/Observer/ParentItemProcessor/AdaptParentItemProcessorPlugin.php b/vendor/magento/module-inventory-configurable-product/Plugin/CatalogInventory/Observer/ParentItemProcessor/AdaptParentItemProcessorPlugin.php index 33bb05564c4..7aaa84f2b43 100644 --- a/vendor/magento/module-inventory-configurable-product/Plugin/CatalogInventory/Observer/ParentItemProcessor/AdaptParentItemProcessorPlugin.php +++ b/vendor/magento/module-inventory-configurable-product/Plugin/CatalogInventory/Observer/ParentItemProcessor/AdaptParentItemProcessorPlugin.php @@ -83,20 +83,17 @@ public function aroundProcess( if ($this->isSingleSourceMode->execute()) { $proceed($product); } else { - $stockItem = $this->stockRegistry->getStockItem($product->getId()); - if (!$stockItem->getManageStock() && !$stockItem->getUseConfigManageStock()) { - $parentIds = $this->configurableType->getParentIdsByChild($product->getId()); - $skus = $this->getSkusByProductIds->execute($parentIds); + $parentIds = $this->configurableType->getParentIdsByChild($product->getId()); + $skus = $this->getSkusByProductIds->execute($parentIds); - $dataForUpdate = []; - foreach ($parentIds as $parentId) { - $parentStockItem = $this->stockRegistry->getStockItem($parentId); - if ($parentStockItem->getIsInStock()) { - $dataForUpdate[$skus[$parentId]] = true; - } + $dataForUpdate = []; + foreach ($parentIds as $parentId) { + $parentStockItem = $this->stockRegistry->getStockItem($parentId); + if ($parentStockItem->getIsInStock()) { + $dataForUpdate[$skus[$parentId]] = true; } - $this->updateLegacyStockStatus->execute($dataForUpdate); } + $this->updateLegacyStockStatus->execute($dataForUpdate); } } }