woocommerce_segment = $woocommerce_segment; $this->woocommerce_helper = $woocommerce_helper; parent::__construct($timer); } function checkProcessingRequirements() { return $this->woocommerce_helper->isWooCommerceActive(); } function processTaskStrategy(ScheduledTask $task) { $this->woocommerce_segment->synchronizeCustomers(); // abort if execution limit is reached CronHelper::enforceExecutionLimit($this->timer); return true; } }