In this blog, you'll learn two different ways to check if a customer is logged in or not in Magento 2. 1. Object Manager 2. By Injecting a Class.
Comments