From fb65f19085cce53efa6326c87d0c9367fd44b2d3 Mon Sep 17 00:00:00 2001 From: Rostislav Wolny Date: Wed, 15 May 2019 22:02:38 +0200 Subject: [PATCH] Remove old auth error notice displaying out of newsletters page [MAILPOET-1987] --- lib/Config/Menu.php | 8 -------- lib/Config/ServicesChecker.php | 11 ----------- 2 files changed, 19 deletions(-) diff --git a/lib/Config/Menu.php b/lib/Config/Menu.php index 022f13ab7e..b6884f249d 100644 --- a/lib/Config/Menu.php +++ b/lib/Config/Menu.php @@ -89,7 +89,6 @@ class Menu { $this->subscribers_over_limit = $subscribers_feature->check(); $this->checkMailPoetAPIKey(); $this->checkPremiumKey(); - $this->checkFromEmailAuthorization(); $this->wp->addAction( 'admin_menu', @@ -910,13 +909,6 @@ class Menu { $this->premium_key_valid = $checker->isPremiumKeyValid($show_notices); } - private function checkFromEmailAuthorization() { - if (self::isOnMailPoetAdminPage() && stripos($_REQUEST['page'], self::MAIN_PAGE_SLUG) === false) { - $checker = $this->servicesChecker; - $checker->isFromEmailAuthorized(); - } - } - function getLimitPerPage($model = null) { if ($model === null) { return Listing\Handler::DEFAULT_LIMIT_PER_PAGE; diff --git a/lib/Config/ServicesChecker.php b/lib/Config/ServicesChecker.php index bf565ae111..1e3ed6e641 100644 --- a/lib/Config/ServicesChecker.php +++ b/lib/Config/ServicesChecker.php @@ -119,15 +119,4 @@ class ServicesChecker { return false; } - - function isFromEmailAuthorized() { - $mta_log_error = $this->settings->get('mta_log.error', []); - - if (isset($mta_log_error['operation']) && $mta_log_error['operation'] === MailerError::OPERATION_AUTHORIZATION) { - WPNotice::displayError($mta_log_error['error_message'], 'js-error-unauthorized-email', '', false, false); - return false; - } - - return true; - } }