Replace the stopped sending notice

[MAILPOET-2643]
This commit is contained in:
Pavel Dohnal
2020-04-01 11:32:48 +02:00
committed by Veljko V
parent 97b76031b5
commit 319b7afd05
3 changed files with 11 additions and 9 deletions

View File

@@ -97,6 +97,7 @@
// This rules unify width across all style setting sidebars // This rules unify width across all style setting sidebars
.components-circular-option-picker { .components-circular-option-picker {
width: 245px; width: 245px;
@include breakpoint-max-width(782px) { @include breakpoint-max-width(782px) {
width: 100%; width: 100%;
} }

View File

@@ -554,10 +554,8 @@ class Menu {
public function checkMailPoetAPIKey(ServicesChecker $checker = null) { public function checkMailPoetAPIKey(ServicesChecker $checker = null) {
if (self::isOnMailPoetAdminPage()) { if (self::isOnMailPoetAdminPage()) {
$showNotices = isset($_REQUEST['page'])
&& stripos($_REQUEST['page'], self::MAIN_PAGE_SLUG) === false;
$checker = $checker ?: $this->servicesChecker; $checker = $checker ?: $this->servicesChecker;
$this->mpApiKeyValid = $checker->isMailPoetAPIKeyValid($showNotices); $this->mpApiKeyValid = $checker->isMailPoetAPIKeyValid();
} }
} }

View File

@@ -33,12 +33,15 @@ class ServicesChecker {
|| $mssKey['state'] == Bridge::KEY_INVALID || $mssKey['state'] == Bridge::KEY_INVALID
) { ) {
if ($displayErrorNotice) { if ($displayErrorNotice) {
$error = Helpers::replaceLinkTags( $error = '<h3>' . __('All sending is currently paused!', 'mailpoet') . '</h3>';
WPFunctions::get()->__('All sending is currently paused! Your key to send with MailPoet is invalid. [link]Visit MailPoet.com to purchase a key[/link]', 'mailpoet'), $error .= '<p>' . __('Your key to send with MailPoet is invalid.', 'mailpoet') . '</p>';
'https://account.mailpoet.com?s=' . Subscriber::getTotalSubscribers(), $error .= '<p><a '
['target' => '_blank'] . ' href="https://account.mailpoet.com?s=' . (Subscriber::getTotalSubscribers() + 1) . '"'
); . ' class="button button-secondary" '
WPNotice::displayError($error); . ' target="_blank"'
. '>' . __('Visit MailPoet.com to purchase a key', 'mailpoet') . '</a></p>';
WPNotice::displayError($error, '', '', false, false);
} }
return false; return false;
} elseif ($mssKey['state'] == Bridge::KEY_EXPIRING } elseif ($mssKey['state'] == Bridge::KEY_EXPIRING