ActionScheduler_Store::validate_schedule()protectedWC 1.0

Validate a ActionScheduler_Schedule object.

Method of the class: ActionScheduler_Store{}

No Hooks.

Return

null. Nothing (null).

Usage

// protected - for code of main (parent) or child class
$result = $this->validate_schedule( $schedule, $action_id );
$schedule(mixed) (required)
The unserialized ActionScheduler_Schedule object.
$action_id(int) (required)
The action ID.

ActionScheduler_Store::validate_schedule() code WC 8.7.0

protected function validate_schedule( $schedule, $action_id ) {
	if ( empty( $schedule ) || ! is_a( $schedule, 'ActionScheduler_Schedule' ) ) {
		throw ActionScheduler_InvalidActionException::from_schedule( $action_id, $schedule );
	}
}