Skip to content

Instantly share code, notes, and snippets.

@supercleanse
Created June 27, 2013 22:31
Show Gist options
  • Select an option

  • Save supercleanse/5880983 to your computer and use it in GitHub Desktop.

Select an option

Save supercleanse/5880983 to your computer and use it in GitHub Desktop.
List the active subscriptions for the current user. The $subscriptions variable will contain an array of memberpress product ids that the user is actively subscribed to. If you want to return an array of product objects instead pass the string 'products' ... or the latest transaction for each subscription you could pass the string 'transactions'…
<?php
$user = MeprUtils::get_currentuserinfo();
$subscriptions = $user->active_product_subscriptions();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment