Shop description – disable rich editor & limit character number

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 Shop description – disable rich editor & limit character number

Viewing 5 reply threads
  • Author
    Posts
    • #96023
      marcinzywy
      Participant

      In vendor store Setup Wizard for field “Shop Description” I would like to:

      – disable rich editor
      – limit character number to 1600 characters only

      Also, I would like to apply this to ‘shop description’ filed in vendor store dashboard settings.

      Thank you for help!

    • #96421
      WCFM Forum
      Keymaster

      HI,

      Please add this code to your site for the purpose –

      add_filter( 'wcfm_product_manage_fields_content', function( $content_fields, $product_id, $product_type ) {
      	if( isset ( $content_fields['description'] ) ) {
      		$content_fields['description']['type'] = 'textarea';
      		$content_fields['description']['attributes'] = array( 'maxlength' => 1600 );
      	}
      	return $content_fields;
      }, 50, 3 );
      add_filter( 'wcfm_marketplace_settings_fields_general', function( $content_fields, $vendor_id ) {
      	if( isset ( $content_fields['shop_description'] ) ) {
      		$content_fields['shop_description']['type'] = 'textarea';
      		$content_fields['shop_description']['attributes'] = array( 'maxlength' => 1600 );
      	}
      	return $content_fields;
      }, 50, 2 );

      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/

      Thank You

    • #96745
      marcinzywy
      Participant

      I tried with the code provided and it works fine.

      Awesome. Thanks.

      Cheers guys!

    • #96828
      WCFM Forum
      Keymaster

      You are always welcome 🙂

      Let me know if there’s anything else we can help you with.

      Can we ask for a favor? Would you mind taking a few minutes to review our plugin at https://wordpress.org/support/plugin/wc-multivendor-marketplace/reviews/ and let others know about your 5 Star experience with WCFM Marketplace. Also, follow us on Twitter https://twitter.com/wcfmmp for more exciting news, important updates, and irresistible offers.  

    • #97028
      marcinzywy
      Participant

      Will do! Thank you:)

    • #97235
      WCFM Forum
      Keymaster

      My pleasure 🙂

Viewing 5 reply threads
  • The topic ‘Shop description – disable rich editor & limit character number’ is closed to new replies.