How to check if a customer is logged in to Magento 2 or not?
There are two ways by which you can check if a customer is logged in or not: 1) By using Object Manager It is always a bad practice to use ObjectManager directly. 2) By Injecting Class (Dependency Injection) As said earlier, it is one of the worst practices to use the ObjectManager directly. Therefore an…
Read More “How to check if a customer is logged in to Magento 2 or not?” »