Get Customer Extension Attribute value Magento 2.

Magento 2, Customer module have comes with extension attributes, getVertexCustomerCode( ) and getIsSubscribed( ).

If you have created your customer extension attributes and you want to fetch customer extension attributes value using Customer Object,  You need to first get Customer Object and based on Customer object you can find your custom extension attributes value.

Code Demo,


You can get result of all the Customer Extension Attributes in above array.

Using the above function, you can get the value of vertex customer code and is subscribed() value of customer object.