CMS Magento Mastering Development

Get error Guest checkout is disabled after ajax customer login Magento 2.3.3

I am facing the issue with “Guest checkout is disabled” error after the customer log in using Ajax call. Guest checkout is disabled due to the requirement. The below code will run on clicking by the “go to checkout” button. $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $customer = $objectManager->create(‘Magento\Customer\Model\Customer’)->load(3121); //2 is Customer ID $customerSession = $objectManager->create(‘Magento\Customer\Model\Session’); $customerSession->setCustomerAsLoggedIn($customer); After […]