I am trying to use login session on magento/catalog/view/base/templates/product/price/amount/default.phtml
to hide price from users not logged in.
However, it seems not working well with
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$customerSession = $objectManager->get('Magento\Customer\Model\Session');
if($customerSession->isLoggedIn()) {
// customer login action
}
As well, I cannot find \Magento\Framework\App folder in my project. But, it seems working well tho. Is there any way that I can find this folder, and that makes it able to get login status?