Tribe__Tickets__Commerce__PayPal__Order::get_related_post_ids( string $post_type = null )
Returns the post IDs related ot this Order.
Contents
Parameters
- $post_type
-
(string) (Optional) Only return post IDs for this post type.
Default value: null
Return
(array)
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;
}
Changelog
| Version | Description |
|---|---|
| 4.7 | Introduced. |