Fix links

[MAILPOET-1571]
This commit is contained in:
Pavel Dohnal
2019-01-22 13:20:17 +01:00
parent 9eeda50b07
commit 06370ea245
3 changed files with 6 additions and 4 deletions

View File

@ -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,

View File

@ -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();

View File

@ -318,7 +318,7 @@
<table width="100%" cellpadding="0" cellspacing="0" border="0" style="border-spacing:0;mso-table-lspace:0;mso-table-rspace:0;border-collapse:collapse">
<tr>
<td class="mailpoet_button-container" style="text-align:center;border-collapse:collapse">
<a class="mailpoet_button" href="https://account.mailpoet.com/premium" style="display:inline-block;-webkit-text-size-adjust:none;mso-hide:all;text-decoration:none;text-align:center;background-color:#fe5301 ;border-color:#0074a2 ;border-width:0px ;border-radius:3px ;border-style:solid ;width:288px ;line-height:50px ;color:#ffffff ;font-family:Arial, 'Helvetica Neue', Helvetica, sans-serif ;font-size:20px ;font-weight:normal ">
<a class="mailpoet_button" href="<%= linkStats %>" style="display:inline-block;-webkit-text-size-adjust:none;mso-hide:all;text-decoration:none;text-align:center;background-color:#fe5301 ;border-color:#0074a2 ;border-width:0px ;border-radius:3px ;border-style:solid ;width:288px ;line-height:50px ;color:#ffffff ;font-family:Arial, 'Helvetica Neue', Helvetica, sans-serif ;font-size:20px ;font-weight:normal ">
<%= __('View all stats') %>
</a></td>
</tr>
@ -343,7 +343,7 @@
<table width="100%" cellpadding="0" cellspacing="0" border="0" style="border-spacing:0;mso-table-lspace:0;mso-table-rspace:0;border-collapse:collapse">
<tr>
<td class="mailpoet_button-container" style="text-align:center;border-collapse:collapse">
<a class="mailpoet_button" href="#" style="display:inline-block;-webkit-text-size-adjust:none;mso-hide:all;text-decoration:none;text-align:center;background-color:#fe5301 ;border-color:#0074a2 ;border-width:0px ;border-radius:3px ;border-style:solid ;width:288px ;line-height:50px ;color:#ffffff ;font-family:Arial, 'Helvetica Neue', Helvetica, sans-serif ;font-size:20px ;font-weight:normal ">
<a class="mailpoet_button" href="<%= premiumPage %>" style="display:inline-block;-webkit-text-size-adjust:none;mso-hide:all;text-decoration:none;text-align:center;background-color:#fe5301 ;border-color:#0074a2 ;border-width:0px ;border-radius:3px ;border-style:solid ;width:288px ;line-height:50px ;color:#ffffff ;font-family:Arial, 'Helvetica Neue', Helvetica, sans-serif ;font-size:20px ;font-weight:normal ">
<%= __('See Premium features') %>
</a></td>
</tr>