Add loading settings to JS also on Welcome Wizard page
Settings are needed in the WooCommerce setup step where we have a logic for setting tracking level. [MAILPOET-3185]
This commit is contained in:
committed by
Veljko V
parent
3896975ef3
commit
93cfc4d251
@@ -58,6 +58,7 @@ class WelcomeWizard {
|
|||||||
'current_wp_user' => $this->wp->wpGetCurrentUser()->to_array(),
|
'current_wp_user' => $this->wp->wpGetCurrentUser()->to_array(),
|
||||||
'subscriber_count' => $this->subscribersFeature->getSubscribersCount(),
|
'subscriber_count' => $this->subscribersFeature->getSubscribersCount(),
|
||||||
'has_mss_key_specified' => Bridge::isMSSKeySpecified(),
|
'has_mss_key_specified' => Bridge::isMSSKeySpecified(),
|
||||||
|
'settings' => $this->settings->getAll(),
|
||||||
];
|
];
|
||||||
$data['mailpoet_feature_flags'] = $this->featuresController->getAllFlags();
|
$data['mailpoet_feature_flags'] = $this->featuresController->getAllFlags();
|
||||||
$this->pageRenderer->displayPage('welcome_wizard.html', $data);
|
$this->pageRenderer->displayPage('welcome_wizard.html', $data);
|
||||||
|
@@ -18,6 +18,7 @@
|
|||||||
var mailpoet_account_url = '<%= add_referral_id("https://account.mailpoet.com/?s=" ~ subscriber_count ~ "&email=" ~ current_wp_user.user_email|escape('js')) %>';
|
var mailpoet_account_url = '<%= add_referral_id("https://account.mailpoet.com/?s=" ~ subscriber_count ~ "&email=" ~ current_wp_user.user_email|escape('js')) %>';
|
||||||
var has_mss_key_specified = <%= json_encode(has_mss_key_specified) %>;
|
var has_mss_key_specified = <%= json_encode(has_mss_key_specified) %>;
|
||||||
var mailpoet_feature_flags = <%= json_encode(mailpoet_feature_flags) %>;
|
var mailpoet_feature_flags = <%= json_encode(mailpoet_feature_flags) %>;
|
||||||
|
var mailpoet_settings = <%= json_encode(settings) %>;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div id="mailpoet-wizard-container"></div>
|
<div id="mailpoet-wizard-container"></div>
|
||||||
|
Reference in New Issue
Block a user