Exam4Training

In which file do you declare the observer?

A module MyModule needs to send notifications to customers only when the account was modified from a mobile app using the REST web APIs.

You decided to implement an observer for customer_save_after_data_object event.

In which file do you declare the observer?
A . etc/webapi_rest/events.xml
B . etc/adminhtml/events.xml
C . etc/webapi/rest_events.xml
D . etc/events.xml

Answer: D

Explanation:

Reference: https://magento.stackexchange.com/questions/256268/how-to-trigger-observer-by-rest-api

Exit mobile version