Display notice only on specified listings pages
[MAILPOET-2643]
This commit is contained in:
@@ -554,8 +554,15 @@ 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
|
||||||
|
|| stripos($_REQUEST['page'], 'mailpoet-segments') !== false
|
||||||
|
|| stripos($_REQUEST['page'], 'mailpoet-subscribers') !== false
|
||||||
|
);
|
||||||
$checker = $checker ?: $this->servicesChecker;
|
$checker = $checker ?: $this->servicesChecker;
|
||||||
$this->mpApiKeyValid = $checker->isMailPoetAPIKeyValid();
|
$checker = $checker ?: $this->servicesChecker;
|
||||||
|
$this->mpApiKeyValid = $checker->isMailPoetAPIKeyValid($showNotices);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user