How could i change the "Store Slug" field as "read only"?

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 WCFM How could i change the "Store Slug" field as "read only"?

Viewing 4 reply threads
  • Author
    Posts
    • #30568
      MOHO
      Participant

      I didn’t want the vendor change their “Store Slug”.

      How could i make the “Store Slug” of setting with “read only”?

    • #30811
      WCFM Forum
      Keymaster

      Hi,

      Here is code for the purpose –

      function wcfm_marketplace_settings_fields_general_custom( $general_fields ) {
      	if( isset( $general_fields['store_slug'] ) ) {
      		$general_fields['store_slug']['attributes'] = array( 'disabled' => true );
      	}
      	return $general_fields;
      }
      add_filter('wcfm_marketplace_settings_fields_general', 'wcfm_marketplace_settings_fields_general_custom', 50 );

      You may add this at that snippet as well.

      Thank You

    • #31138
      MOHO
      Participant

      Thanks it work.

      and how could “store name” also “read only”?

    • #31172
      WCFM Forum
      Keymaster

      Hi,

      Please use this code instead –

      function wcfm_marketplace_settings_fields_general_custom( $general_fields ) {
      	if( isset( $general_fields['store_name'] ) ) {
      		$general_fields['store_name']['attributes'] = array( 'disabled' => true );
      	}
      	if( isset( $general_fields['store_slug'] ) ) {
      		$general_fields['store_slug']['attributes'] = array( 'disabled' => true );
      	}
      	return $general_fields;
      }
      add_filter('wcfm_marketplace_settings_fields_general', 'wcfm_marketplace_settings_fields_general_custom', 50 );

      Thank You

    • #31306
      MOHO
      Participant

      Thanks it work now.

      Please close it.

Viewing 4 reply threads
  • The topic ‘How could i change the "Store Slug" field as "read only"?’ is closed to new replies.