Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
primogenial
/
languages
/
wp-content-20241001222009
/
plugins
/
mailpoet
/
lib
/
Tasks
:
Bounce.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?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, ] ); } }