magento2-module-webhook icon indicating copy to clipboard operation
magento2-module-webhook copied to clipboard

Add 'created' webhooks

Open wcurtis opened this issue 9 years ago • 2 comments

There's no native customer_create_after event in magento so we'll have to use the customer_save_after and check if the object is new or not.

wcurtis avatar Sep 17 '15 00:09 wcurtis

I gave this a shot this evening but unfortunately the isObjectNew() function is always false in the save_after events. Will have to find another way :/

wcurtis avatar Sep 17 '15 01:09 wcurtis

Use plugin instead of events. For example if you intercept ResourceModel::save method you can access to object->getId() method to know is it create or update event.

kandy avatar Sep 27 '15 06:09 kandy