Sync WC customizer styles to WooCommerce settings [MAILPOET-2569]

This commit is contained in:
wxa
2019-12-12 15:11:05 +03:00
committed by wxa
parent 70b2fdc786
commit fa81c24825
3 changed files with 113 additions and 3 deletions

View File

@ -357,8 +357,11 @@ class Initializer {
$feature_enabled = $this->flags_controller->isSupported(FeaturesController::WC_TRANSACTIONAL_EMAILS_CUSTOMIZER);
$opt_in_enabled = $this->settings->get('woocommerce.use_mailpoet_editor', false);
$wc_enabled = $this->wc_helper->isWooCommerceActive();
if ($feature_enabled && $wc_enabled && $opt_in_enabled) {
$this->wc_transactional_emails->useTemplateForWoocommerceEmails();
if ($feature_enabled && $wc_enabled) {
$this->wc_transactional_emails->enableEmailSettingsSyncToWooCommerce();
if ($opt_in_enabled) {
$this->wc_transactional_emails->useTemplateForWoocommerceEmails();
}
}
}