Answers for "magento2 is logged in"

PHP
-2

magento 2.3 check if customer is logged in

$objectManager = MagentoFrameworkAppObjectManager::getInstance();
$customerSession = $objectManager->get('MagentoCustomerModelSession');
if($customerSession->isLoggedIn()) {
   // customer login action
}
Posted by: Guest on August-26-2020

Browse Popular Code Answers by Language