diff --git a/lib/Cron/Workers/SendingQueue/SendingQueue.php b/lib/Cron/Workers/SendingQueue/SendingQueue.php index 3968d74bf5..4cc19dcac7 100644 --- a/lib/Cron/Workers/SendingQueue/SendingQueue.php +++ b/lib/Cron/Workers/SendingQueue/SendingQueue.php @@ -32,7 +32,7 @@ class SendingQueue { public $batchSize; const BATCH_SIZE = 20; const TASK_BATCH_SIZE = 5; - const EMAIL_WITH_INVALID_LIST_OPTION = 'mailpoet_email_with_invalid_list'; + const EMAIL_WITH_INVALID_SEGMENT_OPTION = 'mailpoet_email_with_invalid_segment'; /** @var StatsNotificationsScheduler */ public $statsNotificationsScheduler; @@ -131,7 +131,7 @@ class SendingQueue { ); $queue->status = ScheduledTaskEntity::STATUS_PAUSED; $queue->save(); - $this->wp->setTransient(self::EMAIL_WITH_INVALID_LIST_OPTION, $newsletter->subject); + $this->wp->setTransient(self::EMAIL_WITH_INVALID_SEGMENT_OPTION, $newsletter->subject); continue; } diff --git a/lib/Util/Notices/EmailWithInvalidListNotice.php b/lib/Util/Notices/EmailWithInvalidSegmentNotice.php similarity index 90% rename from lib/Util/Notices/EmailWithInvalidListNotice.php rename to lib/Util/Notices/EmailWithInvalidSegmentNotice.php index 0e984854f9..520c23154c 100644 --- a/lib/Util/Notices/EmailWithInvalidListNotice.php +++ b/lib/Util/Notices/EmailWithInvalidSegmentNotice.php @@ -6,8 +6,8 @@ use MailPoet\Cron\Workers\SendingQueue\SendingQueue; use MailPoet\WP\Functions as WPFunctions; use MailPoet\WP\Notice; -class EmailWithInvalidListNotice { - const OPTION_NAME = SendingQueue::EMAIL_WITH_INVALID_LIST_OPTION; +class EmailWithInvalidSegmentNotice { + const OPTION_NAME = SendingQueue::EMAIL_WITH_INVALID_SEGMENT_OPTION; /** @var WPFunctions */ private $wp; diff --git a/lib/Util/Notices/PermanentNotices.php b/lib/Util/Notices/PermanentNotices.php index 3b05171de7..b4544a6e36 100644 --- a/lib/Util/Notices/PermanentNotices.php +++ b/lib/Util/Notices/PermanentNotices.php @@ -35,7 +35,7 @@ class PermanentNotices { /** @var DeprecatedShortcodeNotice */ private $deprecatedShortcodeNotice; - /** @var EmailWithInvalidListNotice */ + /** @var EmailWithInvalidSegmentNotice */ private $emailWithInvalidListNotice; public function __construct(WPFunctions $wp) { @@ -48,7 +48,7 @@ class PermanentNotices { $this->blackFridayNotice = new BlackFridayNotice(); $this->headersAlreadySentNotice = new HeadersAlreadySentNotice(SettingsController::getInstance(), $wp); $this->deprecatedShortcodeNotice = new DeprecatedShortcodeNotice(); - $this->emailWithInvalidListNotice = new EmailWithInvalidListNotice($wp); + $this->emailWithInvalidListNotice = new EmailWithInvalidSegmentNotice($wp); } public function init() { @@ -112,7 +112,7 @@ class PermanentNotices { case (DeprecatedShortcodeNotice::OPTION_NAME): $this->deprecatedShortcodeNotice->disable(); break; - case (EmailWithInvalidListNotice::OPTION_NAME): + case (EmailWithInvalidSegmentNotice::OPTION_NAME): $this->emailWithInvalidListNotice->disable(); break; } diff --git a/tests/integration/Cron/Workers/SendingQueue/SendingQueueTest.php b/tests/integration/Cron/Workers/SendingQueue/SendingQueueTest.php index 8e7e09094a..af56e36c65 100644 --- a/tests/integration/Cron/Workers/SendingQueue/SendingQueueTest.php +++ b/tests/integration/Cron/Workers/SendingQueue/SendingQueueTest.php @@ -914,7 +914,7 @@ class SendingQueueTest extends \MailPoetTest { $this->entityManager->refresh($newsletter); expect($task->getStatus())->equals(ScheduledTaskEntity::STATUS_PAUSED); expect($newsletter->getStatus())->equals(NewsletterEntity::STATUS_SENDING); - expect($this->wp->getTransient(SendingQueueWorker::EMAIL_WITH_INVALID_LIST_OPTION))->equals('Subject With Trashed'); + expect($this->wp->getTransient(SendingQueueWorker::EMAIL_WITH_INVALID_SEGMENT_OPTION))->equals('Subject With Trashed'); } public function testItPauseSendingTaskThatHasDeletedSegment() { @@ -936,7 +936,7 @@ class SendingQueueTest extends \MailPoetTest { $this->entityManager->refresh($newsletter); expect($task->getStatus())->equals(ScheduledTaskEntity::STATUS_PAUSED); expect($newsletter->getStatus())->equals(NewsletterEntity::STATUS_SENDING); - expect($this->wp->getTransient(SendingQueueWorker::EMAIL_WITH_INVALID_LIST_OPTION))->equals('Subject With Deleted'); + expect($this->wp->getTransient(SendingQueueWorker::EMAIL_WITH_INVALID_SEGMENT_OPTION))->equals('Subject With Deleted'); } public function _after() {