ActionScheduler_wpPostStore::fetch_action()
Fetch actions.
Метод класса: ActionScheduler_wpPostStore{}
Хуки из метода
Возвращает
Объект
.
Использование
$ActionScheduler_wpPostStore = new ActionScheduler_wpPostStore(); $ActionScheduler_wpPostStore->fetch_action( $action_id );
- $action_id(int) (обязательный)
- Action ID.
Код ActionScheduler_wpPostStore::fetch_action() ActionScheduler wpPostStore::fetch action WC 9.4.2
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; }