We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1760ae0 + a58bb2a commit f3145ebCopy full SHA for f3145eb
app/code/Magento/CatalogInventory/Helper/Stock.php
@@ -154,7 +154,10 @@ public function addIsInStockFilterToCollection($collection)
154
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
155
);
156
$resource = $this->getStockStatusResource();
157
- $resource->addStockDataToCollection($collection, !$isShowOutOfStock);
+ $resource->addStockDataToCollection(
158
+ $collection,
159
+ !$isShowOutOfStock && $collection->getFlag('require_stock_items')
160
+ );
161
$collection->setFlag($stockFlag, true);
162
}
163
0 commit comments