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}
|
||||
newsletter={newsletter}
|
||||
isWoocommerceActive={window.mailpoet_woocommerce_active}
|
||||
subscribersCount={window.mailpoet_subscribers_count}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
@@ -11,6 +11,7 @@ function Success(props) {
|
||||
MSSPitchIllustrationUrl={props.MSSPitchIllustrationUrl}
|
||||
onFinish={props.successClicked}
|
||||
isWoocommerceActive={props.isWoocommerceActive}
|
||||
subscribersCount={props.subscribersCount}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@@ -32,6 +33,7 @@ Success.propTypes = {
|
||||
type: PropTypes.string.isRequired,
|
||||
}).isRequired,
|
||||
isWoocommerceActive: PropTypes.bool.isRequired,
|
||||
subscribersCount: PropTypes.number.isRequired,
|
||||
};
|
||||
|
||||
|
||||
|
@@ -15,7 +15,7 @@ function PitchMss(props) {
|
||||
>
|
||||
<WelcomeWizardPitchMSSStep
|
||||
next={props.onFinish}
|
||||
subscribersCount={25}
|
||||
subscribersCount={props.subscribersCount}
|
||||
mailpoetAccountUrl="http://xxx"
|
||||
isWoocommerceActive={props.isWoocommerceActive}
|
||||
/>
|
||||
@@ -28,6 +28,7 @@ PitchMss.propTypes = {
|
||||
MSSPitchIllustrationUrl: PropTypes.string.isRequired,
|
||||
onFinish: PropTypes.func.isRequired,
|
||||
isWoocommerceActive: PropTypes.bool.isRequired,
|
||||
subscribersCount: PropTypes.number.isRequired,
|
||||
};
|
||||
|
||||
|
||||
|
@@ -97,8 +97,9 @@ class Newsletters {
|
||||
$data['premium_plugin_active'] = License::getLicense();
|
||||
$data['is_woocommerce_active'] = $this->woocommerce_helper->isWooCommerceActive();
|
||||
$data['is_mailpoet_update_available'] = array_key_exists(Env::$plugin_path, $this->wp->getPluginUpdates());
|
||||
if (!$data['premium_plugin_active']) {
|
||||
$data['subscribers_count'] = Subscriber::getTotalSubscribers();
|
||||
|
||||
if (!$data['premium_plugin_active']) {
|
||||
$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),
|
||||
'sender' => $this->settings->get('sender'),
|
||||
'admin_email' => $this->wp->getOption('admin_email'),
|
||||
'subscribers_count' => Subscriber::count(),
|
||||
'subscribers_count' => Subscriber::getTotalSubscribers(),
|
||||
'has_premium_key' => Bridge::isMSSKeySpecified(),
|
||||
];
|
||||
$this->page_renderer->displayPage('welcome_wizard.html', $data);
|
||||
|
@@ -43,8 +43,9 @@
|
||||
var mailpoet_mss_active = <%= json_encode(mss_active) %>;
|
||||
var mailpoet_free_plan_announcement_seen = !!+'<%= settings.free_plan_announcement_seen %>';
|
||||
var mailpoet_mta_method = '<%= settings.mta.method %>';
|
||||
<% if not(premium_plugin_active) %>
|
||||
var mailpoet_subscribers_count = <%= subscribers_count %>;
|
||||
|
||||
<% if not(premium_plugin_active) %>
|
||||
var mailpoet_free_premium_subscribers_limit = <%= free_premium_subscribers_limit %>;
|
||||
<% endif %>
|
||||
<% endautoescape %>
|
||||
|
Reference in New Issue
Block a user