Hello there,
I'm looking for an observer event relevant to customer_save_after in Magento 1.x. This event should be global events for a better world.
At this moment I have to hook into 2 events: adminhtml_customer_save_after and customer_register_success
I'm now considering to switch to customer_save_after_data_object, but I'm not sure that is a correct way to do this.
Please give me your advise, suggestions. Any help would be appreciated
Thanks.
Solved! Go to Solution.
Magento 2 triggers the same «customer_save_after» event: https://mage2.pro/t/1229
Magento 2 triggers the same «customer_save_after» event: https://mage2.pro/t/1229
I'm using observer event which listed here: https://cyrillschumacher.com/magento2-list-of-all-dispatched-events/
And «customer_save_after» is not available in that list. It makes my concernation.
Thanks for your answer.
P/s: Is it safe to use it as a global events?
The customer model extends the AbstractModel and here you have the following event triggered in the before/after save methods:
$this->_eventManager->dispatch($this->_eventPrefix . '_save_after', $this->_getEventData());
And in case of customer model, $this->_eventPrefix = customer so you can use the event customer_save_after