1
vote
Accepted
Get customer custom attribute value without loading the customer
You can retrieve customer custom attributes from the customer session; there's no need to load the customer every time in Magento. Please check the code below.
protected $sessionFactory;
public ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
customer × 2108magento2 × 880
magento-1.9 × 353
customer-account × 187
login × 134
orders × 113
attributes × 101
customer-attribute × 94
magento-2.1 × 91
event-observer × 86
checkout × 84
magento-1.8 × 77
admin × 77
customer-address × 67
email × 66
magento2.3 × 62
magento-1.7 × 62
database × 60
rest-api × 60
api × 58
php × 55
session × 54
product × 53
register × 52
module × 48