Use option filters instead of synchronization Woo email styles

With this change the Woo template editor will never overwrite Woo commerce settings,
but replace values of those settings using hooks.
[MAILPOET-3645]
This commit is contained in:
Rostislav Wolny
2021-06-10 09:57:59 +02:00
committed by Veljko V
parent 7158f879aa
commit d5f6f63ebe
4 changed files with 50 additions and 49 deletions

View File

@ -377,11 +377,9 @@ class Initializer {
private function setupWoocommerceTransactionalEmails() {
$wcEnabled = $this->wcHelper->isWooCommerceActive();
$optInEnabled = $this->settings->get('woocommerce.use_mailpoet_editor', false);
if ($wcEnabled) {
$this->wcTransactionalEmails->enableEmailSettingsSyncToWooCommerce();
if ($optInEnabled) {
$this->wcTransactionalEmails->useTemplateForWoocommerceEmails();
}
if ($wcEnabled && $optInEnabled) {
$this->wcTransactionalEmails->overrideStylesForWooEmails();
$this->wcTransactionalEmails->useTemplateForWoocommerceEmails();
}
}
}