Automattic\WooCommerce\Internal\Admin\Schedulers

OrdersScheduler::schedule_recurring_batch_processor │ public static │ WC 1.0

Schedule recurring batch processor for order imports.

Method of the class: OrdersScheduler{}

No Hooks.

Returns

null. Nothing (null).

Usage

$result = OrdersScheduler::schedule_recurring_batch_processor();

OrdersScheduler::schedule_recurring_batch_processor() code WC 11.3.0

public static function schedule_recurring_batch_processor() {
	$action_hook = self::get_action( self::PROCESS_PENDING_ORDERS_BATCH_ACTION );
	if ( null === $action_hook ) {
		return;
	}
	if ( ActionSchedulerUtil::has_scheduled_action( $action_hook ) ) {
		return;
	}

	$interval = self::get_import_interval();

	as_schedule_recurring_action( time(), $interval, $action_hook, array(), static::$group ?? '', true );
}