Add empty automation initializer
[MAILPOET-4135]
This commit is contained in:
@@ -4,7 +4,9 @@ namespace MailPoet\Config;
|
||||
|
||||
use MailPoet\API\JSON\API;
|
||||
use MailPoet\AutomaticEmails\AutomaticEmails;
|
||||
use MailPoet\Automation\Automation;
|
||||
use MailPoet\Cron\CronTrigger;
|
||||
use MailPoet\Features\FeaturesController;
|
||||
use MailPoet\InvalidStateException;
|
||||
use MailPoet\PostEditorBlocks\PostEditorBlock;
|
||||
use MailPoet\PostEditorBlocks\WooCommerceBlocksIntegration;
|
||||
@@ -86,6 +88,12 @@ class Initializer {
|
||||
/** @var SubscriberActivityTracker */
|
||||
private $subscriberActivityTracker;
|
||||
|
||||
/** @var Automation */
|
||||
private $automation;
|
||||
|
||||
/** @var FeaturesController */
|
||||
private $featuresController;
|
||||
|
||||
const INITIALIZED = 'MAILPOET_INITIALIZED';
|
||||
|
||||
public function __construct(
|
||||
@@ -109,7 +117,9 @@ class Initializer {
|
||||
Localizer $localizer,
|
||||
AutomaticEmails $automaticEmails,
|
||||
SubscriberActivityTracker $subscriberActivityTracker,
|
||||
AssetsLoader $assetsLoader
|
||||
AssetsLoader $assetsLoader,
|
||||
Automation $automation,
|
||||
FeaturesController $featuresController
|
||||
) {
|
||||
$this->rendererFactory = $rendererFactory;
|
||||
$this->accessControl = $accessControl;
|
||||
@@ -132,6 +142,8 @@ class Initializer {
|
||||
$this->automaticEmails = $automaticEmails;
|
||||
$this->subscriberActivityTracker = $subscriberActivityTracker;
|
||||
$this->assetsLoader = $assetsLoader;
|
||||
$this->automation = $automation;
|
||||
$this->featuresController = $featuresController;
|
||||
}
|
||||
|
||||
public function init() {
|
||||
@@ -151,6 +163,10 @@ class Initializer {
|
||||
));
|
||||
}
|
||||
|
||||
if ($this->featuresController->isSupported(FeaturesController::AUTOMATION)) {
|
||||
$this->automation->initialize();
|
||||
}
|
||||
|
||||
// activation function
|
||||
WPFunctions::get()->registerActivationHook(
|
||||
Env::$file,
|
||||
|
Reference in New Issue
Block a user