1

I intend to make a call to an API endpoint after a customer's profile information, such as name, date of birth, etc, are updated. The update can be done either by the admin through the admin panel or by the user himself through his account on the frontend.

I'm very new to Magento2. I read up on Magento2 modules and if I understood correctly, it seems like I could do this by hooking up my method with the relevant core classes in the di.xml and create my own after*() method. If this is the case, which are the classes and methods should I be hooking up with to do something after a customer's profile information is updated?

1 Answer 1

2

Following class is responsible for update customer information from frontend my account Go to class

Check execute() method.

This line is responsible for save/update customer information

5
  • Thanks! The description of the execute() method says that "Change customer email or password action". Is this method responsible for customer changing email address, name, date of birth, gender, etc?
    – xenon
    Commented Nov 14, 2016 at 9:29
  • Yes, url : your_url/customer/account/edit
    – Sohel Rana
    Commented Nov 14, 2016 at 9:37
  • I will try out your suggestion. Thanks a lot! :)
    – xenon
    Commented Nov 14, 2016 at 12:17
  • It seems like this only works when user updates his profile from the frontend. It doesn't work when I update the customer's account information from the admin panel.
    – xenon
    Commented Nov 22, 2016 at 8:20
  • yes, you are right. For admin got to -> github.com/magento/magento2/blob/develop/app/code/Magento/…
    – Sohel Rana
    Commented Nov 22, 2016 at 8:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.