Skip to content

Instantly share code, notes, and snippets.

@BRMatt
Last active August 29, 2015 14:02
Show Gist options
  • Save BRMatt/c40d520982cb12145eeb to your computer and use it in GitHub Desktop.
Save BRMatt/c40d520982cb12145eeb to your computer and use it in GitHub Desktop.
<?php
// This will dump information about all plans the currently signed in member has access to
var_dump(memberful_wp_user_plans_subscribed_to(wp_get_current_user()->ID));
// This will print all downloads the currently signed in member has access to, including those granted by a subscription
var_dump(memberful_wp_user_downloads( wp_get_current_user()->ID ));
// You can also pass the id of a specific user to get the plans for that specific user. E.g
var_dump(memberful_wp_user_plans_subscribed_to(4));
// Will print the plans user with id 4 is currently subscribed to.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment