- This topic has 2 replies, 2 voices, and was last updated 10 years, 8 months ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
WordPress Membership Plugin
Simple Membership Plugin › Forums › Simple Membership Plugin › fetch role levels
This plugin works well with our product since we deal mainly with dealers that we know. We can put up members and the many different dealer levels ourselves (like silver membership or gold membership) each membership has its own prices for our ordering system. I want to fetch that information from either php or javascript. Anyone know any code to retrieve the current user’s role LEVEL and email?
I have tried
$user = new WP_User( $user_id );
$roles = (array) $user->roles;
But that will give their roles as a subscriber, not their role level. I know I’m overlooking a simple solution but any help would be appreciated.
Have you seen the article under Advanced Tweaks – on CSS?
https://simple-membership-plugin.com/simple-membership-miscellaneous-php-tweaks/
I think it might do what you want.
I don’t know how I missed that article, but it is exactly what I needed for the companies needs. Thank you good sir.