I'm trying to get custom customer attribute value (for attribute code abn_no) without loading the customer but not able to find any way to get it.
Is there any way to get custom customer attribute value without loading the customer?
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.Sign up to join this community
This is not correct method but you have asked the question I answered it.
You can load the attribute's value by attribute's code/Id(static) with customer id(dynamic get from session). For this you have to run raw SQL for the respected attribute table like "customer_entity_varchar". Note: Attribute Id can change respected to deploy environment.
2nd Method: This method is bit more correct one, you can set value in session of customer after login as you said.