Provider::save_series_relationship( int $post_id, WP_Post $post )

Saves the relationship between Events and Series when built from the Series side.


Parameters

$post_id

(int) (Required) The post ID of the Series currently being saved.

$post

(WP_Post) (Required) A reference to the Series Post object.


Top ↑

Source

File: src/Events_Pro/Custom_Tables/V1/Series/Provider.php

	public function save_series_relationship( $post_id, $post ) {
		if ( ! $post instanceof WP_Post ) {
			return;
		}

		if ( ! $this->container->make( Series::class )->is_same_type( $post ) ) {
			return;
		}

		/** @var Relationships $relationship_handler */
		$relationship_handler = $this->container->make( Relationships::class );
		$relationship_handler->save_relationships_from_series( tribe( Requests::class )->from_http_request() );
	}

Top ↑

Changelog

Changelog
Version Description
6.0.0 Introduced.