Skip to content

Commit 43379f9

Browse files
committed
Merge branch 'ACP2E-4142' of https://github.com/adobe-commerce-tier-4/magento2ce into ACP2E-4142
2 parents 24d4d9a + 62d02c1 commit 43379f9

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

app/code/Magento/CatalogImportExport/Model/StockItemProcessor.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,8 @@ public function process(array $stockData, array $importedData): void
3333
{
3434
$importStockData = [];
3535
foreach ($stockData as $sku => $productStockData) {
36-
if (isset($stockData[Store::DEFAULT_STORE_ID])) {
37-
$importStockData[$sku] = $productStockData[Store::DEFAULT_STORE_ID];
38-
} else {
39-
$importStockData[$sku] = reset($productStockData);
40-
}
36+
$storeData = $productStockData[Store::DEFAULT_STORE_ID] ?? reset($productStockData);
37+
$importStockData[$sku] = $storeData;
4138
}
4239
$this->stockItemImporter->import($importStockData);
4340
}

0 commit comments

Comments
 (0)