<?php namespace MailPoet\Cron\Workers; if (!defined('ABSPATH')) exit; use MailPoet\Models\ScheduledTask; use MailPoet\Segments\WooCommerce as WooCommerceSegment; use MailPoet\WooCommerce\Helper as WooCommerceHelper; class WooCommerceSync extends SimpleWorker { const TASK_TYPE = 'woocommerce_sync'; const SUPPORT_MULTIPLE_INSTANCES = false; const AUTOMATIC_SCHEDULING = false; /** @var WooCommerceSegment */ private $woocommerceSegment; /** @var WooCommerceHelper */ private $woocommerceHelper; public function __construct( WooCommerceSegment $woocommerceSegment, WooCommerceHelper $woocommerceHelper ) { $this->woocommerceSegment = $woocommerceSegment; $this->woocommerceHelper = $woocommerceHelper; parent::__construct(); } public function checkProcessingRequirements() { return $this->woocommerceHelper->isWooCommerceActive(); } public function processTaskStrategy(ScheduledTask $task, $timer) { $this->woocommerceSegment->synchronizeCustomers(); return true; } }
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
KeyCheck | Folder | 0755 |
|
|
SendingQueue | Folder | 0755 |
|
|
StatsNotifications | Folder | 0755 |
|
|
AuthorizedSendingEmailsCheck.php | File | 888 B | 0644 |
|
Beamer.php | File | 1.61 KB | 0644 |
|
Bounce.php | File | 5.69 KB | 0644 |
|
ExportFilesCleanup.php | File | 863 B | 0644 |
|
InactiveSubscribers.php | File | 2.28 KB | 0644 |
|
Scheduler.php | File | 8.62 KB | 0644 |
|
SimpleWorker.php | File | 2.55 KB | 0644 |
|
SubscriberLinkTokens.php | File | 1.06 KB | 0644 |
|
SubscribersCountCacheRecalculation.php | File | 3.31 KB | 0644 |
|
SubscribersEngagementScore.php | File | 2.36 KB | 0644 |
|
SubscribersLastEngagement.php | File | 4.76 KB | 0644 |
|
UnsubscribeTokens.php | File | 1.67 KB | 0644 |
|
WooCommercePastOrders.php | File | 2.37 KB | 0644 |
|
WooCommerceSync.php | File | 1.01 KB | 0644 |
|
WorkersFactory.php | File | 3.96 KB | 0644 |
|
index.php | File | 0 B | 0644 |
|