Skip to content

Instantly share code, notes, and snippets.

@labsecrets
Forked from BRMatt/example.php
Created June 5, 2014 12:01
Show Gist options
  • Save labsecrets/abc61c9c5b2ec0f40cfc to your computer and use it in GitHub Desktop.
Save labsecrets/abc61c9c5b2ec0f40cfc 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