Magento 2 Code Snippet to save customer attribute

Magento 2 Save Custom Customer Attribute

To save custom customer attribute in magento 2, follow the below Sample Code Snippet. For Illustration Purpose the object manager is called directly and the CustomerRepositoryInterface class is instantiated. But in Real time the code structure will differ, the dependencies has to be injected via the constructor.

Leave a Comment

Your email address will not be published. Required fields are marked *

1 × three =