Trigger action on delete customer in backend

I am developing a plugin that links Shopware to e-mailing software. When a customer is deleted in the backend I would like to remove that person in the e-mailing software as well. The problem is that i can’t find an event to hook my controller to. It works when new customers are created or updated, but not when deleted. What I have is this:

 public static function getSubscribedEvents() { return ['Enlight\_Controller\_Action\_PreDispatch\_Backend\_Customer' =\> 'updateContact',]; } 

But it does not trigger on delete. Could anyone point me in the right direction? Many thanks in advance!


1 Like

A Doctrine LifecycleEvent should be triggered on delete a customer:

1 Like