Best Multi Vendor Marketplace Plugin for WordPress › Forums › WCFM – Feature Request › Ability to restrict char length of a store name
- This topic has 2 replies, 2 voices, and was last updated 6 years ago by
kaloomee.
Viewing 2 reply threads
- AuthorPosts
- September 21, 2019 at 4:44 pm #82800
kaloomee
ParticipantHi
I would like to request that admin be able to set the maximum characters that a vendor can use as their store name
Having too long a name can mess up the layout/look of themes store pages and wcfm cards etcThank you
Kaloomee - September 22, 2019 at 3:00 pm #82937
WCFM Forum
MemberHi,
Please use this code for the purpose –
add_filter( 'wcfm_membership_registration_fields', function( $store_name_fields ) { if( isset( $store_name_fields['store_name'] ) ) { $store_name_fields['store_name']['attributes'] = array( 'maxlength' => 10 ); } return $store_name_fields; }); add_filter( 'wcfm_marketplace_settings_fields_general', function( $store_name_fields ) { if( isset( $store_name_fields['store_name'] ) ) { $store_name_fields['store_name']['attributes'] = array( 'maxlength' => 10 ); } return $store_name_fields; });
Well, I have set length “10” here, you may change this to as per your requirement.
Thank You
- September 22, 2019 at 4:40 pm #82955
kaloomee
ParticipantThank you
Wonderful support again
- AuthorPosts
Viewing 2 reply threads
- The topic ‘Ability to restrict char length of a store name’ is closed to new replies.