This commit is contained in:
Prospress Inc
2017-06-09 16:36:26 +02:00
committed by Remco Tolsma
parent 5e536ec717
commit b99eba2f79
51 changed files with 1413 additions and 642 deletions

View File

@@ -694,7 +694,16 @@ class WC_API_Subscriptions extends WC_API_Orders {
$query_args['post_status'] = $statuses;
unset( $args['status'] );
}
if ( ! empty( $args['customer_id'] ) ) {
$query_args['meta_query'] = array(
array(
'key' => '_customer_user',
'value' => absint( $args['customer_id'] ),
'compare' => '=',
),
);
}
$query_args = $this->merge_query_args( $query_args, $args );