_objectManager->create(\Magento\ProductAlert\Model\Price::class) ->deleteCustomer( $this->customerSession->getCustomerId(), $this->_objectManager->get(\Magento\Store\Model\StoreManagerInterface::class) ->getStore() ->getWebsiteId() ); $this->messageManager->addSuccess(__('You will no longer receive price alerts for this product.')); } catch (\Exception $e) { $this->messageManager->addException($e, __('Unable to update the alert subscription.')); } /** @var \Magento\Framework\Controller\Result\Redirect $resultRedirect */ $resultRedirect = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT); return $resultRedirect->setPath('customer/account/'); } }