Pass the correct subscribers count to MSS pitch
[MAILPOET-2142]
This commit is contained in:
committed by
Jack Kitterhing
parent
bedde4994a
commit
1c4cb05cdf
@@ -34,6 +34,7 @@ function renderSuccess(newsletter, testingPassed) {
|
|||||||
successClicked={successPageClosed}
|
successClicked={successPageClosed}
|
||||||
newsletter={newsletter}
|
newsletter={newsletter}
|
||||||
isWoocommerceActive={window.mailpoet_woocommerce_active}
|
isWoocommerceActive={window.mailpoet_woocommerce_active}
|
||||||
|
subscribersCount={window.mailpoet_subscribers_count}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@@ -11,6 +11,7 @@ function Success(props) {
|
|||||||
MSSPitchIllustrationUrl={props.MSSPitchIllustrationUrl}
|
MSSPitchIllustrationUrl={props.MSSPitchIllustrationUrl}
|
||||||
onFinish={props.successClicked}
|
onFinish={props.successClicked}
|
||||||
isWoocommerceActive={props.isWoocommerceActive}
|
isWoocommerceActive={props.isWoocommerceActive}
|
||||||
|
subscribersCount={props.subscribersCount}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -32,6 +33,7 @@ Success.propTypes = {
|
|||||||
type: PropTypes.string.isRequired,
|
type: PropTypes.string.isRequired,
|
||||||
}).isRequired,
|
}).isRequired,
|
||||||
isWoocommerceActive: PropTypes.bool.isRequired,
|
isWoocommerceActive: PropTypes.bool.isRequired,
|
||||||
|
subscribersCount: PropTypes.number.isRequired,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@@ -15,7 +15,7 @@ function PitchMss(props) {
|
|||||||
>
|
>
|
||||||
<WelcomeWizardPitchMSSStep
|
<WelcomeWizardPitchMSSStep
|
||||||
next={props.onFinish}
|
next={props.onFinish}
|
||||||
subscribersCount={25}
|
subscribersCount={props.subscribersCount}
|
||||||
mailpoetAccountUrl="http://xxx"
|
mailpoetAccountUrl="http://xxx"
|
||||||
isWoocommerceActive={props.isWoocommerceActive}
|
isWoocommerceActive={props.isWoocommerceActive}
|
||||||
/>
|
/>
|
||||||
@@ -28,6 +28,7 @@ PitchMss.propTypes = {
|
|||||||
MSSPitchIllustrationUrl: PropTypes.string.isRequired,
|
MSSPitchIllustrationUrl: PropTypes.string.isRequired,
|
||||||
onFinish: PropTypes.func.isRequired,
|
onFinish: PropTypes.func.isRequired,
|
||||||
isWoocommerceActive: PropTypes.bool.isRequired,
|
isWoocommerceActive: PropTypes.bool.isRequired,
|
||||||
|
subscribersCount: PropTypes.number.isRequired,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@@ -97,8 +97,9 @@ class Newsletters {
|
|||||||
$data['premium_plugin_active'] = License::getLicense();
|
$data['premium_plugin_active'] = License::getLicense();
|
||||||
$data['is_woocommerce_active'] = $this->woocommerce_helper->isWooCommerceActive();
|
$data['is_woocommerce_active'] = $this->woocommerce_helper->isWooCommerceActive();
|
||||||
$data['is_mailpoet_update_available'] = array_key_exists(Env::$plugin_path, $this->wp->getPluginUpdates());
|
$data['is_mailpoet_update_available'] = array_key_exists(Env::$plugin_path, $this->wp->getPluginUpdates());
|
||||||
|
$data['subscribers_count'] = Subscriber::getTotalSubscribers();
|
||||||
|
|
||||||
if (!$data['premium_plugin_active']) {
|
if (!$data['premium_plugin_active']) {
|
||||||
$data['subscribers_count'] = Subscriber::getTotalSubscribers();
|
|
||||||
$data['free_premium_subscribers_limit'] = License::FREE_PREMIUM_SUBSCRIBERS_LIMIT;
|
$data['free_premium_subscribers_limit'] = License::FREE_PREMIUM_SUBSCRIBERS_LIMIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -44,7 +44,7 @@ class WelcomeWizard {
|
|||||||
'finish_wizard_url' => $this->wp->adminUrl('admin.php?page=' . Menu::MAIN_PAGE_SLUG),
|
'finish_wizard_url' => $this->wp->adminUrl('admin.php?page=' . Menu::MAIN_PAGE_SLUG),
|
||||||
'sender' => $this->settings->get('sender'),
|
'sender' => $this->settings->get('sender'),
|
||||||
'admin_email' => $this->wp->getOption('admin_email'),
|
'admin_email' => $this->wp->getOption('admin_email'),
|
||||||
'subscribers_count' => Subscriber::count(),
|
'subscribers_count' => Subscriber::getTotalSubscribers(),
|
||||||
'has_premium_key' => Bridge::isMSSKeySpecified(),
|
'has_premium_key' => Bridge::isMSSKeySpecified(),
|
||||||
];
|
];
|
||||||
$this->page_renderer->displayPage('welcome_wizard.html', $data);
|
$this->page_renderer->displayPage('welcome_wizard.html', $data);
|
||||||
|
@@ -43,8 +43,9 @@
|
|||||||
var mailpoet_mss_active = <%= json_encode(mss_active) %>;
|
var mailpoet_mss_active = <%= json_encode(mss_active) %>;
|
||||||
var mailpoet_free_plan_announcement_seen = !!+'<%= settings.free_plan_announcement_seen %>';
|
var mailpoet_free_plan_announcement_seen = !!+'<%= settings.free_plan_announcement_seen %>';
|
||||||
var mailpoet_mta_method = '<%= settings.mta.method %>';
|
var mailpoet_mta_method = '<%= settings.mta.method %>';
|
||||||
|
var mailpoet_subscribers_count = <%= subscribers_count %>;
|
||||||
|
|
||||||
<% if not(premium_plugin_active) %>
|
<% if not(premium_plugin_active) %>
|
||||||
var mailpoet_subscribers_count = <%= subscribers_count %>;
|
|
||||||
var mailpoet_free_premium_subscribers_limit = <%= free_premium_subscribers_limit %>;
|
var mailpoet_free_premium_subscribers_limit = <%= free_premium_subscribers_limit %>;
|
||||||
<% endif %>
|
<% endif %>
|
||||||
<% endautoescape %>
|
<% endautoescape %>
|
||||||
|
Reference in New Issue
Block a user