Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM › How could i change the "Store Slug" field as "read only"?
- This topic has 4 replies, 2 voices, and was last updated 6 years, 2 months ago by MOHO.
Viewing 4 reply threads
- AuthorPosts
- September 3, 2018 at 2:19 am #30568MOHOParticipant
I didn’t want the vendor change their “Store Slug”.
How could i make the “Store Slug” of setting with “read only”?
- September 5, 2018 at 5:45 am #30811WCFM ForumMember
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
- September 8, 2018 at 5:49 am #31138MOHOParticipant
Thanks it work.
and how could “store name” also “read only”?
- September 8, 2018 at 4:40 pm #31172WCFM ForumMember
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
- September 11, 2018 at 8:50 am #31306MOHOParticipant
Thanks it work now.
Please close it.
- AuthorPosts
Viewing 4 reply threads
- The topic ‘How could i change the "Store Slug" field as "read only"?’ is closed to new replies.