Move WPHooks methods to WPFunctions

This commit is contained in:
Amine Ben hammou
2019-01-28 19:00:19 +01:00
parent d452cfcae7
commit 8b602bd947
49 changed files with 354 additions and 258 deletions

View File

@@ -15,7 +15,7 @@ use MailPoet\Models\Subscriber as SubscriberModel;
use MailPoet\Segments\SubscribersFinder;
use MailPoet\Tasks\Sending as SendingTask;
use MailPoet\Tasks\Subscribers\BatchIterator;
use MailPoet\WP\Hooks as WPHooks;
use MailPoet\WP\Functions as WPFunctions;
if(!defined('ABSPATH')) exit;
@@ -39,7 +39,8 @@ class SendingQueue {
$this->mailer_task = ($mailer_task) ? $mailer_task : new MailerTask();
$this->newsletter_task = ($newsletter_task) ? $newsletter_task : new NewsletterTask();
$this->timer = ($timer) ? $timer : microtime(true);
$this->batch_size = WPHooks::applyFilters('mailpoet_cron_worker_sending_queue_batch_size', self::BATCH_SIZE);
$wp = new WPFunctions;
$this->batch_size = $wp->applyFilters('mailpoet_cron_worker_sending_queue_batch_size', self::BATCH_SIZE);
}
function process() {