If you want to query by a post author , you can try the author
input argument:
$sub_orders = get_children(
array(
'author' => $seller_id,
'post_parent' => $reservation->transaction_id,
'post_type' => 'shop_order',
'post_status' => array(
'wc-pending',
'wc-completed',
'wc-processing',
'wc-on-hold'
)
)
);
Note that get_children()
calls get_posts()
, that is again a wrapper for WP_Query
, so you can use the author_name
, author__in
and author__not_in
input arguments as well.