Skip to content

Commit

Permalink
Update Stock.php
Browse files Browse the repository at this point in the history
Relates to issue: magento#8566

A flag set to null will always overwrite the isShowOutOfStock variable. So you can't set the default value from the admin configuration.
  • Loading branch information
Corefix authored Mar 1, 2017
1 parent 84d382b commit a602762
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/code/Magento/CatalogInventory/Helper/Stock.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public function addIsInStockFilterToCollection($collection)
$resource = $this->getStockStatusResource();
$resource->addStockDataToCollection(
$collection,
!$isShowOutOfStock && $collection->getFlag('require_stock_items')
!$isShowOutOfStock || $collection->getFlag('require_stock_items')
);
$collection->setFlag($stockFlag, true);
}
Expand Down

0 comments on commit a602762

Please sign in to comment.