Provider::update_series_post_status( string $new_status, string $old_status, WP_Post $post )

Updates the post status of auto-generated Series posts when one of their related Events post status changes.


Parameters

$new_status

(string) (Required) The new post status.

$old_status

(string) (Required) The old post status.

$post

(WP_Post) (Required) The post object, at this stage it might not be an Event post.


Top ↑

Return

(void) The method will return early if the post is not an Event post, else the post status will be updated.


Top ↑

Source

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

	public function update_series_post_status( $new_status, $old_status, $post ): void {
		if ( ! (
			is_string( $old_status )
			&& is_string( $new_status )
			&& $post instanceof WP_Post
			&& $post->post_type === TEC::POSTTYPE )
		) {
			return;
		}

		$this->container->make( Autogenerated_Series::class )
		                ->update_series_post_status( $post, $old_status, $new_status );
	}

Top ↑

Changelog

Changelog
Version Description
6.0.11 Introduced.