Disable Vendor Change hopname and Shopslug

We're shifting our Forum based support to a more dedicated support system!

We'll be closing our Forum support from 10th June, 2020 and move to Email Support assistance.

  • If you are a WCFM premium add-ons user, contact us- here
  • Want to know more before buying our add-ons? Send Pre sale queries- here
  • If you are a WCFM free user, please open a support ticket at WordPress.org
  • For WCFM App related queries, reach us- here
From now the forum will be read-only!

Multi Vendor Marketplace Plugin | WCFM Marketplace Forums WC Marketplace Disable Vendor Change hopname and Shopslug

Viewing 8 reply threads
  • Author
    Posts
    • #139281
      Patrick
      Participant

      Hi, 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

    • #139482

      Hello,

      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.

    • #139569
      Patrick
      Participant

      Sorry, this code does not working

    • #139859
      Patrick
      Participant

      Hi 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/

    • #139954

      Hello,

      Please provide us the site access with site URL, so we can check.

      Thanks.

    • #139958
      Patrick
      Participant
      This reply has been marked as private.
    • #139959
      Patrick
      Participant

      is it ok like this? as private?

    • #140214

      Hi,

      Please check again and confirm.

      Thanks.

    • #140284
      Patrick
      Participant

      Perfect Thanks!!!!!!!

Viewing 8 reply threads
  • You must be logged in to reply to this topic.