Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WC Marketplace › Disable Vendor Change hopname and Shopslug
- This topic has 9 replies, 2 voices, and was last updated 4 years, 8 months ago by
Patrick.
- AuthorPosts
- June 7, 2020 at 6:17 pm #139281
Patrick
ParticipantHi, how can i make that vendors cannot change there shopname and slugname, only with a request to site admin? who should be able to do this
If vendor register he can make shopname, later not able to change - June 8, 2020 at 12:28 pm #139482
Sarmistha Chakraborty
MemberHello,
add_filter( 'body_class', function( $classes ) { $userid = get_current_user_id(); if(wcfm_is_vendor($userid)) { $classes = array_merge( $classes, array( 'vendor-dashboard' ) ); } return $classes; }); add_action('wp_footer',function(){ ?> <script type="text/javascript"> if( $('.vendor-dashboard #store_name').length > 0 ) { $('.vendor-dashboard #store_name').prop('readonly', true);; } if( $('.vendor-dashboard #store_slug').length > 0 ) { $('.vendor-dashboard #store_slug').prop('readonly', true);; } </script> <?php });
Add this code to your child theme’s functions.php
In case you do not have child theme then add code using this plugin – https://wordpress.org/plugins/code-snippets/
Thanks.
- June 8, 2020 at 4:04 pm #139569
Patrick
ParticipantSorry, this code does not working
- June 8, 2020 at 10:43 pm #139708
Sarmistha Chakraborty
MemberPlease clear browser cache and check again.
Thanks.
- June 9, 2020 at 2:37 pm #139859
Patrick
ParticipantHi I try everything clear browser cashe, copy your code again and vendor can change shopname, i need this because vendor do not allowed change shopname and slug
if a vendor goes to dashboard slug is https://.www.domain.name/store-manager/settings/
- June 9, 2020 at 8:14 pm #139954
Sarmistha Chakraborty
MemberHello,
Please provide us the site access with site URL, so we can check.
Thanks.
- June 9, 2020 at 8:34 pm #139958
Patrick
ParticipantThis reply has been marked as private. - June 9, 2020 at 8:36 pm #139959
Patrick
Participantis it ok like this? as private?
- June 10, 2020 at 1:47 pm #140214
Sarmistha Chakraborty
MemberHi,
Please check again and confirm.
Thanks.
- June 10, 2020 at 5:21 pm #140284
Patrick
ParticipantPerfect Thanks!!!!!!!
- AuthorPosts
- You must be logged in to reply to this topic.