Execute mailpoet_initialized hook earlier after setup [PREMIUM-2]

This is done because Router can seize the request and prevent subsequent actions like Premium hooking from being run, so hooks didn't work in cron daemon.
This commit is contained in:
Alexey Stoletniy
2017-03-06 15:10:31 +03:00
parent ed4d3d52ed
commit 16dc81150d

View File

@ -85,6 +85,7 @@ class Initializer {
$this->setupConflictResolver();
$this->plugin_initialized = true;
do_action('mailpoet_initialized', MAILPOET_VERSION);
} catch(\Exception $e) {
$this->handleFailedInitialization($e);
}
@ -100,7 +101,6 @@ class Initializer {
$this->setupAPI();
$this->setupRouter();
$this->setupPages();
do_action('mailpoet_initialized', MAILPOET_VERSION);
} catch(\Exception $e) {
$this->handleFailedInitialization($e);
}