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
.components-circular-option-picker {
width: 245px;
@include breakpoint-max-width(782px) {
width: 100%;
}

View File

@@ -554,10 +554,8 @@ class Menu {
public function checkMailPoetAPIKey(ServicesChecker $checker = null) {
if (self::isOnMailPoetAdminPage()) {
$showNotices = isset($_REQUEST['page'])
&& stripos($_REQUEST['page'], self::MAIN_PAGE_SLUG) === false;
$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
) {
if ($displayErrorNotice) {
$error = Helpers::replaceLinkTags(
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'),
'https://account.mailpoet.com?s=' . Subscriber::getTotalSubscribers(),
['target' => '_blank']
);
WPNotice::displayError($error);
$error = '<h3>' . __('All sending is currently paused!', 'mailpoet') . '</h3>';
$error .= '<p>' . __('Your key to send with MailPoet is invalid.', 'mailpoet') . '</p>';
$error .= '<p><a '
. ' href="https://account.mailpoet.com?s=' . (Subscriber::getTotalSubscribers() + 1) . '"'
. ' class="button button-secondary" '
. ' target="_blank"'
. '>' . __('Visit MailPoet.com to purchase a key', 'mailpoet') . '</a></p>';
WPNotice::displayError($error, '', '', false, false);
}
return false;
} elseif ($mssKey['state'] == Bridge::KEY_EXPIRING