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; } }