MemberPress current user subscription id

932 Views Asked by At

I'm trying to get the subscription ID(s) for the current user in MemberPress. Can't find any examples of this in the documentation.

3

There are 3 best solutions below

0
Rachel On

Something like this should work:

$user = new MeprUser( get_current_user_id());

$subscriptions = $user->active_product_subscriptions('ids');
0
Ben Borchard On

$active_subscription_ids = MeprUtils::get_currentuserinfo()->active_product_subscriptions('ids');

1
Deborah Psenner On
$user = get_current_user_id();