WordPress at Your Fingertips
function is not described

ActionScheduler_wpPostStore::make_action_from_post() protected WC 1.0

Make action from post.

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

No Hooks.

Return

WP_Post.

Usage

// protected - for code of main (parent) or child class
$result = $this->make_action_from_post( $post );
$post(WP_Post) (required)
Post object.

Code of ActionScheduler_wpPostStore::make_action_from_post() WC 6.1.0

protected function make_action_from_post( $post ) {
	$hook = $post->post_title;

	$args = json_decode( $post->post_content, true );
	$this->validate_args( $args, $post->ID );

	$schedule = get_post_meta( $post->ID, self::SCHEDULE_META_KEY, true );
	$this->validate_schedule( $schedule, $post->ID );

	$group = wp_get_object_terms( $post->ID, self::GROUP_TAXONOMY, array( 'fields' => 'names' ) );
	$group = empty( $group ) ? '' : reset( $group );

	return ActionScheduler::factory()->get_stored_action( $this->get_action_status_by_post_status( $post->post_status ), $hook, $args, $schedule, $group );
}