Zapier_Provider::add_to_queue( int $post_id, WP_Post $post, boolean $update )

Add a custom post id to a trigger queue.


Parameters

$post_id

(int) (Required) A WordPress custom post id.

$post

(WP_Post) (Required) A WordPress custom post object.

$update

(boolean) (Required) Whether this is an update to a custom post or new. Unreliable and not used.


Top ↑

Source

File: src/Common/Event_Automator/Zapier/Zapier_Provider.php

	public function add_to_queue( $post_id, $post, $update ) {
		// TEC is not available return to prevent errors.
		if ( ! class_exists('Tribe__Events__Main' ) ) {
			return;
		}

		$data = [
			'post'   => $post,
			'update' => $update,
		];

		$this->container->make( New_Events::class )->add_to_queue( $post_id, $data );
	}

Top ↑

Changelog

Changelog
Version Description
6.0.0 Introduced.