Skip to content

Commit

Permalink
Merge pull request #8 from Smile-SA/issue-stock-item-plugin
Browse files Browse the repository at this point in the history
Fix issue fatal error stock item plugin
  • Loading branch information
Fanny DECLERCK authored Oct 21, 2019
2 parents 6bbd3eb + 50b9821 commit af66c2b
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 af66c2b

Please sign in to comment.