ActionScheduler_InvalidActionException::from_schedulepublic staticWC 1.0

Create a new exception when the action's schedule cannot be fetched.

Method of the class: ActionScheduler_InvalidActionException{}

No Hooks.

Returns

static.

Usage

$result = ActionScheduler_InvalidActionException::from_schedule( $action_id, $schedule );
$action_id(string) (required)
The action ID with bad args.
$schedule(mixed) (required)
Passed schedule.

ActionScheduler_InvalidActionException::from_schedule() code WC 9.9.5

public static function from_schedule( $action_id, $schedule ) {
	$message = sprintf(
		/* translators: 1: action ID 2: schedule */
		__( 'Action [%1$s] has an invalid schedule: %2$s', 'woocommerce' ),
		$action_id,
		var_export( $schedule, true ) // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_var_export
	);

	return new static( $message );
}