WordPress at Your Fingertips
function is not described

WC_Action_Queue::get_next() public WC 1.0

Get the date and time for the next scheduled occurence of an action with a given hook (an optionally that matches certain args and group), if any.

{} It's a method of the class: WC_Action_Queue{}

No Hooks.

Return

WC_DateTime|null. The date and time for the next occurrence, or null if there is no pending, scheduled action for the given hook.

Usage

$WC_Action_Queue = new WC_Action_Queue();
$WC_Action_Queue->get_next( $hook, $args, $group );
$hook(string) (required)
The hook that the job will trigger.
$args(array)
Filter to a hook with matching args that will be passed to the job when it runs.
Default: null
$group(string)
Filter to only actions assigned to a specific group.
Default: ''

Code of WC_Action_Queue::get_next() WC 5.9.0

public function get_next( $hook, $args = null, $group = '' ) {

	$next_timestamp = as_next_scheduled_action( $hook, $args, $group );

	if ( is_numeric( $next_timestamp ) ) {
		return new WC_DateTime( "@{$next_timestamp}", new DateTimeZone( 'UTC' ) );
	}

	return null;
}