NewsletterReplayMetadata.php
2 months ago
ScheduledTaskSubscribersListingRepository.php
2 years ago
ScheduledTaskSubscribersRepository.php
1 month ago
ScheduledTasksRepository.php
1 month ago
SendingQueuesRepository.php
1 week ago
TimeZoneCampaignScheduler.php
1 week ago
index.php
3 years ago
NewsletterReplayMetadata.php
24 lines
| 1 | <?php declare(strict_types = 1); |
| 2 | |
| 3 | namespace MailPoet\Newsletter\Sending; |
| 4 | |
| 5 | if (!defined('ABSPATH')) exit; |
| 6 | |
| 7 | |
| 8 | class NewsletterReplayMetadata { |
| 9 | public const LATEST_NEWSLETTER_REPLAY = 'latest_newsletter_replay'; |
| 10 | public const REPLAY_SOURCE_NEWSLETTER_ID = 'replay_source_newsletter_id'; |
| 11 | public const REPLAY_SOURCE_QUEUE_ID = 'replay_source_queue_id'; |
| 12 | public const REPLAY_SOURCE_TASK_ID = 'replay_source_task_id'; |
| 13 | public const REPLAY_SUBSCRIBER_ID = 'replay_subscriber_id'; |
| 14 | public const AUTOMATION = 'automation'; |
| 15 | |
| 16 | public static function isLatestNewsletterReplayMeta(?array $meta): bool { |
| 17 | return ($meta[self::LATEST_NEWSLETTER_REPLAY] ?? false) === true; |
| 18 | } |
| 19 | |
| 20 | public static function getMetaLikePattern(): string { |
| 21 | return '%"' . self::LATEST_NEWSLETTER_REPLAY . '":true%'; |
| 22 | } |
| 23 | } |
| 24 |