diff --git a/lib/Cron/Workers/StatsNotifications/Worker.php b/lib/Cron/Workers/StatsNotifications/Worker.php
index 2255042700..6204da7be4 100644
--- a/lib/Cron/Workers/StatsNotifications/Worker.php
+++ b/lib/Cron/Workers/StatsNotifications/Worker.php
@@ -112,9 +112,10 @@ class Worker {
number_format($opened, 2),
number_format($unsubscribed, 2)
),
- $context['topLinkClicks'] = 0,
+ 'topLinkClicks' => 0,
'linkSettings' => get_site_url(null, '/wp-admin/admin.php?page=mailpoet-settings#basics'),
'linkStats' => get_site_url(null, '/wp-admin/admin.php?page=mailpoet-newsletters#/stats/' . $newsletter->id()),
+ 'premiumPage' => get_site_url(null, '/wp-admin/admin.php?page=mailpoet-premium'),
'premiumPluginActive' => is_plugin_active('mailpoet-premium/mailpoet-premium.php'),
'clicked' => $clicked,
'opened' => $opened,
diff --git a/tests/integration/Cron/Workers/StatsNotifications/WorkerTest.php b/tests/integration/Cron/Workers/StatsNotifications/WorkerTest.php
index 03d5df385e..177fbadbe3 100644
--- a/tests/integration/Cron/Workers/StatsNotifications/WorkerTest.php
+++ b/tests/integration/Cron/Workers/StatsNotifications/WorkerTest.php
@@ -30,6 +30,7 @@ class WorkerTest extends \MailPoetTest {
\ORM::raw_execute('TRUNCATE ' . Newsletter::$_table);
\ORM::raw_execute('TRUNCATE ' . ScheduledTask::$_table);
\ORM::raw_execute('TRUNCATE ' . SendingQueue::$_table);
+ \ORM::raw_execute('TRUNCATE ' . StatsNotification::$_table);
$this->mailer = $this->createMock(Mailer::class);
$this->renderer = $this->createMock(Renderer::class);
$this->stats_notifications = new Worker($this->mailer, $this->renderer);
@@ -212,7 +213,7 @@ class WorkerTest extends \MailPoetTest {
'count_processed' => 15,
]);
- $this->mailer->expects($this->once())
+ $this->mailer->expects($this->exactly(2))
->method('send');
$this->stats_notifications->process();
diff --git a/views/emails/statsNotification.html b/views/emails/statsNotification.html
index 173154aeb2..c90470353d 100644
--- a/views/emails/statsNotification.html
+++ b/views/emails/statsNotification.html
@@ -318,7 +318,7 @@