Use javascript notice
[MAILPOET-2643]
This commit is contained in:
@ -56,7 +56,6 @@ class Menu {
|
||||
}
|
||||
|
||||
public function init() {
|
||||
$this->checkMailPoetAPIKey();
|
||||
$this->checkPremiumKey();
|
||||
|
||||
$this->wp->addAction(
|
||||
@ -552,20 +551,6 @@ class Menu {
|
||||
// Used for displaying admin notices only
|
||||
}
|
||||
|
||||
public function checkMailPoetAPIKey(ServicesChecker $checker = null) {
|
||||
if (self::isOnMailPoetAdminPage()) {
|
||||
$showNotices = isset($_REQUEST['page'])
|
||||
&& (
|
||||
stripos($_REQUEST['page'], self::MAIN_PAGE_SLUG) !== false
|
||||
|| stripos($_REQUEST['page'], 'mailpoet-segments') !== false
|
||||
|| stripos($_REQUEST['page'], 'mailpoet-subscribers') !== false
|
||||
);
|
||||
$checker = $checker ?: $this->servicesChecker;
|
||||
$checker = $checker ?: $this->servicesChecker;
|
||||
$this->mpApiKeyValid = $checker->isMailPoetAPIKeyValid($showNotices);
|
||||
}
|
||||
}
|
||||
|
||||
public function checkPremiumKey(ServicesChecker $checker = null) {
|
||||
$showNotices = isset($_SERVER['SCRIPT_NAME'])
|
||||
&& stripos($_SERVER['SCRIPT_NAME'], 'plugins.php') !== false;
|
||||
|
Reference in New Issue
Block a user