Little late, but you can create your custom db query to list the subscribers and filter even only acitve members directly from SQL
Assuming your database table prefix is “wp_”
function list_all_subscriptions() {
global $wpdb;
$query= "";
$query .= "SELECT wp_posts.* FROM wp_posts ";
$query .= "INNER JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id ) ";
$query .= "WHERE 1=1 ";
$query .= "AND wp_posts.post_type = 'ywsbs_subscription' ";
$query .= "AND ( wp_postmeta.meta_key = 'status' AND wp_postmeta.meta_value = 'active' ) "; // will filters only active members
$query .= "GROUP BY wp_posts.ID ";
$query .= "ORDER BY ID DESC";
// echo $query;
$subscribers = $wpdb->get_results( $query );
}
list_all_subscriptions();
Hope this helps.
Regards.
-
This reply was modified 3 years, 5 months ago by ugene.
-
This reply was modified 3 years, 5 months ago by ugene.