TransWikia.com

Craft 2: possible to control plugin triggering order?

Craft CMS Asked on February 16, 2021

I have a Craft site which has 2 different plugins listening to the same event (the Contact Form beforeSend event).

The outcome is one is being triggered before the other and this is causing issues. Is there any way of specifying the priority of one plugin over the other or ensuring that they happen in a specific sequence?

Cole

One Answer

Unfortunately, nothing I'm aware of for Craft 2, I'm afraid.

In Craft 3, there's still not a great solution, but there is a $append parameter where you can kind of force it to go to the top of the list: https://github.com/yiisoft/yii2/blob/master/framework/base/Event.php#L103

But that would stop a plugin that was loaded after yours to use the same parameter and come out on top.

Correct answer by Brad Bell on February 16, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP