Hot answers tagged

1

This should be the right code: $customerSession = $objectManager->create("Magento\Customer\Model\Session"); echo $customerSession->getCustomerId(); By using this great code it should work. Therefore, the customer ID will get returned to you.


Only top voted, non community-wiki answers of a minimum length are eligible