Created
March 23, 2015 15:04
-
-
Save strangerstudios/5ddb488dee48dd88ecb5 to your computer and use it in GitHub Desktop.
Show a member's membership level with Paid Memberships Pro.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(is_user_logged_in() && function_exists('pmpro_hasMembershipLevel') && pmpro_hasMembershipLevel()) | |
{ | |
global $current_user; | |
$current_user->membership_level = pmpro_getMembershipLevelForUser($current_user->ID); | |
echo 'Membership Level: ' . $current_user->membership_level->name; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment