Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Groups & Staffs › Hiding "Custom Capability" in "Add Staff" tab
- This topic has 10 replies, 3 voices, and was last updated 6 years, 8 months ago by Bingal.
- AuthorPosts
- March 9, 2018 at 6:24 am #19999JinGuest
Hi,
I want to have vendors to create/manage their staffs, but I don’t want vendors to set staff’s capability.
Is there any way to hide “custom capability” checkbox/fields in “Add Staff” tab?Thank you.
- March 9, 2018 at 12:10 pm #20006WCFM ForumMember
Hi Jin,
There is no settings for the purpose but you may achieve this using this code snippet –
function wcfm_staff_manager_fields_manupulation( $staff_fields ) { if( isset( $staff_fields['has_custom_capability'] ) && wcfm_is_vendor() ) { $staff_fields['has_custom_capability']['class'] = 'wcfm_ele_hide'; $staff_fields['has_custom_capability']['label_class'] = 'wcfm_ele_hide'; } return $staff_fields; } add_filter( 'wcfm_staff_manager_fields_general', 'wcfm_staff_manager_fields_manupulation' );
Just add this code to your site theme functions.php
Please know me is this works for you or not!
Thank You
- March 9, 2018 at 1:38 pm #20012JinGuest
Thanks for your help, the code works perfectly!
Does this mean that I can add below code to make ‘username’ field to disappear?
$staff_fields[‘user_name’][‘label_class’] = ‘wcfm_ele_hide’;
$staff_fields[‘user_name’][‘class’] = ‘wcfm_ele_hide’;Thank you.
- March 9, 2018 at 3:55 pm #20031JinGuest
And is it possible to add {vendor_name} and {email} (that vendor used to register) in email notification form, other than {site_url}, {user_role}, {username}, {first_name}, {password}?
- March 9, 2018 at 4:06 pm #20035BingalMember
Hi,
If you hide ‘user_name’ then Staff can not be created, it’s required field to add a Staff.
Can you please know me, which email notification your are talking about?
Thank You
- March 9, 2018 at 5:29 pm #20041JinGuest
I’m referring to new staff creation email form, the last image on this knowledgebase site https://wclovers.com/knowledgebase/wcfm-groups-staffs/
Thanks
- March 9, 2018 at 5:56 pm #20043WCFM ForumMember
Hi,
Thanks for the clarification.
This email goes to newly created Staff user with his account details.
Why vendor details should be here?
Thank You
- March 9, 2018 at 6:45 pm #20046JinGuest
Im thinking of having multi-vendors taking care of their own staffs. Was just curious if it is possible to do so.
- March 9, 2018 at 6:56 pm #20048WCFM ForumMember
Hi,
Yes off course, vendor may have there own staffs.
In fact, staff custom capability was there to enhance this, vendor will able to assign different role to different staffs – one to product and another to order etc…
Thank You
- March 9, 2018 at 7:19 pm #20050JinGuest
Okay, I will look more into it.
Thanks for all your help.
- March 10, 2018 at 6:25 am #20069BingalMember
Yeah sure … please know me if you required any further assistance on this.
- AuthorPosts
- The topic ‘Hiding "Custom Capability" in "Add Staff" tab’ is closed to new replies.