Tribe__Tickets__Commerce__PayPal__Order::get_related_post_ids( string $post_type = null )

Returns the post IDs related ot this Order.


Parameters

$post_type

(string) (Optional) Only return post IDs for this post type.

Default value: null


Top ↑

Return

(array)


Top ↑

Source

File: src/Tribe/Commerce/PayPal/Order.php

	public function get_related_post_ids( $post_type = null ) {
		$post_ids = $this->post_ids;

		if ( null !== $post_type ) {
			$candidates = array_map( 'get_post', $post_ids );
			$filtered   = wp_list_filter( $candidates, array( 'post_type' => $post_type ) );
			$post_ids   = wp_list_pluck( $filtered, 'ID' );
		}

		return $post_ids;
	}

Top ↑

Changelog

Changelog
Version Description
4.7 Introduced.