Answers for "magento 2.3 check if customer is logged in"

PHP
-2

magento 2.3 check if customer is logged in

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$customerSession = $objectManager->get('Magento\Customer\Model\Session');
if($customerSession->isLoggedIn()) {
   // customer login action
}
Posted by: Guest on August-26-2020

Code answers related to "magento 2.3 check if customer is logged in"

Browse Popular Code Answers by Language