WordPress at Your Fingertips
function is not described

ActionScheduler_wpPostStore::fetch_action() public WC 1.0

Fetch actions.

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

Hooks from the method

Return

Object.

Usage

$ActionScheduler_wpPostStore = new ActionScheduler_wpPostStore();
$ActionScheduler_wpPostStore->fetch_action( $action_id );
$action_id(int) (required)
Action ID.

Code of ActionScheduler_wpPostStore::fetch_action() WC 6.1.1

public function fetch_action( $action_id ) {
	$post = $this->get_post( $action_id );
	if ( empty( $post ) || self::POST_TYPE !== $post->post_type ) {
		return $this->get_null_action();
	}

	try {
		$action = $this->make_action_from_post( $post );
	} catch ( ActionScheduler_InvalidActionException $exception ) {
		do_action( 'action_scheduler_failed_fetch_action', $post->ID, $exception );
		return $this->get_null_action();
	}

	return $action;
}