Show free section only to relevant users
[MAILPOET-2274]
This commit is contained in:
committed by
Jack Kitterhing
parent
6a8c7ae99b
commit
9e4d1190f9
@ -20,15 +20,17 @@ class Premium {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function render() {
|
function render() {
|
||||||
|
if ($this->features_controller->isSupported(FeaturesController::NEW_PREMIUM_PAGE)) {
|
||||||
|
$data = [
|
||||||
|
'subscriber_count' => Subscriber::getTotalSubscribers(),
|
||||||
|
];
|
||||||
|
$this->page_renderer->displayPage('premium.html', $data);
|
||||||
|
} else {
|
||||||
$data = [
|
$data = [
|
||||||
'subscriber_count' => Subscriber::getTotalSubscribers(),
|
'subscriber_count' => Subscriber::getTotalSubscribers(),
|
||||||
'sub_menu' => Menu::MAIN_PAGE_SLUG,
|
'sub_menu' => Menu::MAIN_PAGE_SLUG,
|
||||||
'display_discount' => time() <= strtotime('2018-11-30 23:59:59'),
|
'display_discount' => time() <= strtotime('2018-11-30 23:59:59'),
|
||||||
];
|
];
|
||||||
|
|
||||||
if ($this->features_controller->isSupported(FeaturesController::NEW_PREMIUM_PAGE)) {
|
|
||||||
$this->page_renderer->displayPage('premium.html', $data);
|
|
||||||
} else {
|
|
||||||
$this->page_renderer->displayPage('premium_old.html', $data);
|
$this->page_renderer->displayPage('premium_old.html', $data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
|
<% if (subscriber_count < 1000 ) %>
|
||||||
<div class="mailpoet-premium-page-text">
|
<div class="mailpoet-premium-page-text">
|
||||||
<h1><%= _x('MailPoet Premium is actually yours for free', 'This text resides in the Premium page: /wp-admin/admin.php?page=mailpoet-premium') %></h1>
|
<h1><%= _x('MailPoet Premium is actually yours for free', 'This text resides in the Premium page: /wp-admin/admin.php?page=mailpoet-premium') %></h1>
|
||||||
<p>
|
<p>
|
||||||
@ -40,6 +41,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
|
<% endif %>
|
||||||
|
|
||||||
<div class="mailpoet-premium-page-text">
|
<div class="mailpoet-premium-page-text">
|
||||||
<h1><%= _x('Does this sound like you?', 'This text resides in the Premium page: /wp-admin/admin.php?page=mailpoet-premium') %></h1>
|
<h1><%= _x('Does this sound like you?', 'This text resides in the Premium page: /wp-admin/admin.php?page=mailpoet-premium') %></h1>
|
||||||
|
Reference in New Issue
Block a user