cron_hook_identifier ) ) { wp_schedule_event( time() + 10, $this->cron_interval_identifier, $this->cron_hook_identifier ); } } /** * Task * * Override this method to perform any actions required on each * queue item. Return the modified item for further processing * in the next pass through. Or, return false to remove the * item from the queue. * * @param string $callback Update callback function * @return mixed */ protected function task( $callback ) { if ( isset( $callback['filter'], $callback['args'] ) ) { WC_Emails::send_queued_transactional_email( $callback['filter'], $callback['args'] ); } return false; } /** * Save and run queue. */ public function dispatch_queue() { if ( ! empty( $this->data ) ) { $this->save()->dispatch(); } } }