Skip to content

Commit a963a0b

Browse files
Merge remote-tracking branch 'remotes/github/MC-10968' into EPAM-PR-37
2 parents 7a7ac4b + f65164e commit a963a0b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

app/code/Magento/ConfigurableProduct/Model/Product/VariationHandler.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,9 @@ protected function fillSimpleProductData(
203203
$postData['stock_data'] = array_diff_key((array)$parentProduct->getStockData(), array_flip($keysFilter));
204204
if (!isset($postData['stock_data']['is_in_stock'])) {
205205
$stockStatus = $parentProduct->getQuantityAndStockStatus();
206-
$postData['stock_data']['is_in_stock'] = $stockStatus['is_in_stock'];
206+
if (isset($stockStatus['is_in_stock'])) {
207+
$postData['stock_data']['is_in_stock'] = $stockStatus['is_in_stock'];
208+
}
207209
}
208210
$postData = $this->processMediaGallery($product, $postData);
209211
$postData['status'] = isset($postData['status'])
@@ -262,6 +264,8 @@ public function duplicateImagesForVariations($productsData)
262264
}
263265

264266
/**
267+
* Process media gallery for product
268+
*
265269
* @param \Magento\Catalog\Model\Product $product
266270
* @param array $productData
267271
*

0 commit comments

Comments
 (0)