sessionHelper->isPersistent()) { $this->sessionHelper->getSession()->removePersistentCookie(); if (!$this->customerSession->isLoggedIn()) { $this->customerSession->setCustomerId(null)->setCustomerGroupId(null); } $this->quoteManager->setGuest(); } $checkoutUrl = $this->_redirect->getRefererUrl(); /** @var \Magento\Framework\Controller\Result\Redirect $resultRedirect */ $resultRedirect = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT); $resultRedirect->setUrl($checkoutUrl . (strpos($checkoutUrl, '?') ? '&' : '?') . 'register'); return $resultRedirect; } }