$args = array(
‘numberposts’ => -1,
‘post_type’ => ‘wps_subscriptions’,
‘post_status’ => ‘wc-wps_renewal’,
‘meta_query’ => array(
‘relation’ => ‘AND’,
array(
‘key’ => ‘wps_subscription_status’,
‘value’ => ‘active’,
),
array(
‘key’ => ‘wps_customer_id’,
‘value’ => 20,
),
),
);
$wps_subscriptions = get_posts( $args );
print_r($wps_subscriptions);die();
I used the same query but returning empty array and already have active subscription. Can you please check