Ability to restrict char length of a store name

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 – Feature Request Ability to restrict char length of a store name

Viewing 2 reply threads
  • Author
    Posts
    • #82800
      kaloomee
      Participant

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

      Thank you
      Kaloomee

    • #82937
      WCFM Forum
      Keymaster

      Hi,

      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

    • #82955
      kaloomee
      Participant

      Thank you
      Wonderful support again

Viewing 2 reply threads
  • The topic ‘Ability to restrict char length of a store name’ is closed to new replies.