From 453d185998b49b6ae3b739ca3dc1ca54348d0728 Mon Sep 17 00:00:00 2001 From: bencroker Date: Thu, 14 Sep 2023 11:26:39 +0100 Subject: [PATCH] Add todo note --- src/Campaign.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Campaign.php b/src/Campaign.php index faadb56a..ab0e09be 100644 --- a/src/Campaign.php +++ b/src/Campaign.php @@ -702,9 +702,10 @@ private function _registerTwigExtensions(): void */ private function _registerFeedMeElements(): void { - // Ensure that the plugin is enabled and exists after application initialisation. + // Ensure that the plugin is enabled and exists on application initialisation. // https://github.com/putyourlightson/craft-campaign/issues/400 // https://github.com/putyourlightson/craft-campaign/issues/412 + // TODO: replace with `Application::onInit()` in 5.0.0 Event::on(Application::class, Application::EVENT_INIT, function() { if (Craft::$app->getPlugins()->getPlugin('feed-me') !== null) { Event::on(FeedMeElements::class, FeedMeElements::EVENT_REGISTER_FEED_ME_ELEMENTS,