File "Bounce.php"
Full Path: /home/warrior1/public_html/languages/wp-content-20241001222009/plugins/mailpoet/lib/Tasks/Bounce.php
File size: 849 bytes
MIME-type: text/x-php
Charset: utf-8
<?php
namespace MailPoet\Tasks;
if (!defined('ABSPATH')) exit;
use MailPoet\Entities\ScheduledTaskEntity;
use MailPoet\Models\ScheduledTaskSubscriber;
use MailPoet\Models\Subscriber;
class Bounce {
public static function prepareSubscribers(ScheduledTaskEntity $task) {
// Prepare subscribers on the DB side for performance reasons
Subscriber::rawExecute(
'INSERT IGNORE INTO ' . MP_SCHEDULED_TASK_SUBSCRIBERS_TABLE . '
(task_id, subscriber_id, processed)
SELECT ? as task_id, s.`id` as subscriber_id, ? as processed
FROM ' . MP_SUBSCRIBERS_TABLE . ' s
WHERE s.`deleted_at` IS NULL
AND s.`status` IN (?, ?)',
[
$task->getId(),
ScheduledTaskSubscriber::STATUS_UNPROCESSED,
Subscriber::STATUS_SUBSCRIBED,
Subscriber::STATUS_UNCONFIRMED,
]
);
}
}