Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Marketplace (WooCommerce Multivendor Marketplace) › Get user group
- This topic has 7 replies, 2 voices, and was last updated 5 years ago by WCFM Forum.
- AuthorPosts
- October 15, 2019 at 5:46 pm #86968PATselovParticipant
I use WCFM – Ultimate and WCFM – Groups & Staffs
After registering a user according to the tariff plan and a specific group, I need to get the status of a user to show or hide information.
For example: there are two groups “Free” and “Payment”
How to find out the type of user that displays information only for “Payment”? - October 16, 2019 at 3:09 pm #87136WCFM ForumMember
HI,
You have to setup capability setting for each group.
DO you have setup that yet?
Thank You
- October 16, 2019 at 4:00 pm #87155PATselovParticipant
Yes, I already set up groups.
I’m interested in the code so that I can use it in php files when I edit page templates. - October 18, 2019 at 9:43 am #87509WCFM ForumMember
Hi,
I need to get the status of a user to show or hide information.
– Which information you are talking about, please show me screenshot.
Vendor information visibility can be manage from capability setting – https://ibb.co/2ccmKNs
Thank You
- October 18, 2019 at 11:14 am #87540PATselovParticipant
No, I need this as a variable value, so that I can use this value in if else blocks when writing my own template code.
- October 21, 2019 at 9:26 am #87895WCFM ForumMember
Well, there has filters to check all these capabilities.
You have to tell me exact requirement, then I ca give you right filter for that checking.
Thank You
- October 21, 2019 at 1:07 pm #88008PATselovParticipant
I created my own post type and fields for it
I have 3 tariff plans Standard, Business, Premium
In my template I want to display some fields only for the Premium group
To do this, to use the “if {} else {};” I need to find out which group the logged in user.
How do I get the value which of the groups the user belongs to?
- October 23, 2019 at 11:14 am #88411WCFM ForumMember
HI,
Use this to fetch vendor’s groups –
$wcfm_user_groups = (array) get_user_meta( $user_id, '_wcfm_vendor_group', true );
Well, this returns groups in array format as one vendor may associate with multiple groups.
Thank You
- AuthorPosts
- The topic ‘Get user group’ is closed to new replies.