Skip to content

Commit 05ec582

Browse files
Change the logic to check if the stock has been set so that it needs both the quantity and is_in_stock values.
1 parent 3c5a508 commit 05ec582

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Model/Component/Products.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ public function constructAttributeData (array $attributes, \Magento\Catalog\Mode
306306
*/
307307
public function isStockSpecified(array $productData)
308308
{
309-
if (isset($productData[self::IS_IN_STOCK_COLUMN_HEADING]) || isset($productData[self::QTY_COLUMN_HEADING])) {
309+
if (isset($productData[self::IS_IN_STOCK_COLUMN_HEADING]) && isset($productData[self::QTY_COLUMN_HEADING])) {
310310
return true;
311311
}
312312
return false;

0 commit comments

Comments
 (0)