Skip to content

Commit

Permalink
Fix issue fatal error stock item plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Fanny DECLERCK committed Oct 21, 2019
1 parent 6bbd3eb commit 50b9821
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Plugin/StockItemPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function afterSetIsInStock(\Magento\CatalogInventory\Model\Stock\Item $it
if ($this->settingsHelper->useStoreOffers()) {
$offerStock = $this->helper->getCurrentOfferStock($item->getProductId());
if ($offerStock !== null && $offerStock->getIsInStock() === 0) {
return $this->setData(\Magento\CatalogInventory\Model\Stock\Item::IS_IN_STOCK, $offerStock->getIsInStock());
return $item->setData(\Magento\CatalogInventory\Model\Stock\Item::IS_IN_STOCK, $offerStock->getIsInStock());
}
}

Expand Down

0 comments on commit 50b9821

Please sign in to comment.