Skip to content

Commit e2b58cd

Browse files
committed
#22814: Product stock alert - unsubscribe not working
Small formatting changes
1 parent 259534d commit e2b58cd

File tree

1 file changed

+13
-13
lines changed
  • app/code/Magento/ProductAlert/Controller/Unsubscribe

1 file changed

+13
-13
lines changed

app/code/Magento/ProductAlert/Controller/Unsubscribe/Stock.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class Stock extends UnsubscribeController implements HttpPostActionInterface
3232
protected $productRepository;
3333

3434
/**
35-
* @var StoreManagerInterface
35+
* @var StoreManagerInterface|null
3636
*/
3737
private $storeManager;
3838

@@ -79,18 +79,18 @@ public function execute()
7979
try {
8080
$product = $this->retrieveProduct($productId);
8181
$model = $this->stockFactory->create()
82-
->setCustomerId($this->customerSession->getCustomerId())
83-
->setProductId($product->getId())
84-
->setWebsiteId(
85-
$this->storeManager
86-
->getStore()
87-
->getWebsiteId()
88-
)->setStoreId(
89-
$this->storeManager
90-
->getStore()
91-
->getId()
92-
)
93-
->loadByParam();
82+
->setCustomerId($this->customerSession->getCustomerId())
83+
->setProductId($product->getId())
84+
->setWebsiteId(
85+
$this->storeManager
86+
->getStore()
87+
->getWebsiteId()
88+
)->setStoreId(
89+
$this->storeManager
90+
->getStore()
91+
->getId()
92+
)
93+
->loadByParam();
9494
if ($model->getId()) {
9595
$model->delete();
9696
}

0 commit comments

Comments
 (0)