Use DI for automatic emails in initializer
[MAILPOET-3924]
This commit is contained in:
@@ -76,6 +76,9 @@ class Initializer {
|
|||||||
/** @var Localizer */
|
/** @var Localizer */
|
||||||
private $localizer;
|
private $localizer;
|
||||||
|
|
||||||
|
/** @var AutomaticEmails */
|
||||||
|
private $automaticEmails;
|
||||||
|
|
||||||
/** @var AssetsLoader */
|
/** @var AssetsLoader */
|
||||||
private $assetsLoader;
|
private $assetsLoader;
|
||||||
|
|
||||||
@@ -100,6 +103,7 @@ class Initializer {
|
|||||||
WooCommerceBlocksIntegration $woocommerceBlocksIntegration,
|
WooCommerceBlocksIntegration $woocommerceBlocksIntegration,
|
||||||
WooCommerceHelper $wcHelper,
|
WooCommerceHelper $wcHelper,
|
||||||
Localizer $localizer,
|
Localizer $localizer,
|
||||||
|
AutomaticEmails $automaticEmails,
|
||||||
AssetsLoader $assetsLoader
|
AssetsLoader $assetsLoader
|
||||||
) {
|
) {
|
||||||
$this->rendererFactory = $rendererFactory;
|
$this->rendererFactory = $rendererFactory;
|
||||||
@@ -120,6 +124,7 @@ class Initializer {
|
|||||||
$this->postEditorBlock = $postEditorBlock;
|
$this->postEditorBlock = $postEditorBlock;
|
||||||
$this->woocommerceBlocksIntegration = $woocommerceBlocksIntegration;
|
$this->woocommerceBlocksIntegration = $woocommerceBlocksIntegration;
|
||||||
$this->localizer = $localizer;
|
$this->localizer = $localizer;
|
||||||
|
$this->automaticEmails = $automaticEmails;
|
||||||
$this->assetsLoader = $assetsLoader;
|
$this->assetsLoader = $assetsLoader;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -367,9 +372,8 @@ class Initializer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function setupAutomaticEmails() {
|
public function setupAutomaticEmails() {
|
||||||
$automaticEmails = new AutomaticEmails();
|
$this->automaticEmails->init();
|
||||||
$automaticEmails->init();
|
$this->automaticEmails->getAutomaticEmails();
|
||||||
$automaticEmails->getAutomaticEmails();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function multisiteDropTables($tables) {
|
public function multisiteDropTables($tables) {
|
||||||
|
Reference in New Issue
Block a user