Remoce fields from "add product" section

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 – Ultimate Remoce fields from "add product" section

Viewing 1 reply thread
  • Author
    Posts
    • #106265
      andreasenglowski
      Participant

      Hi,
      i am looking to remove some fields from the vendor -> add product window. Did attach screenshot for you. Is that possible?

      Thanks in advance,
      Andi

      Attachments:
      You must be logged in to view attached files.
    • #106458
      Sushobhan
      Keymaster

      Hi,
      Kindly use the following snippet for this-

      add_filter( 'wcfm_product_manage_fields_general', function( $general_fields, $product_id, $product_type ) {
      	if( isset( $general_fields['pro_title'] ) ) {
      		$general_fields['pro_title']['attributes'] = array( 'maxlength' => 10 ); //number of characters permitted. Change it as per your need.
      	}
      	return $general_fields;
      }, 50, 3 );
      
      add_filter( 'wcfm_product_manage_fields_pricing', function( $pricing_fields, $product_id, $product_type ) {
          if ( isset( $pricing_fields['sale_price'] ) ) {
              unset( $pricing_fields['sale_price'] );
          }
          return $pricing_fields;
      }, 50, 3 );
      
      add_filter( 'wcfm_product_manage_fields_content', function( $content_fields, $product_id, $product_type ) {
          if ( isset( $content_fields['excerpt'] ) ) {
              $content_fields['excerpt']['media_buttons'] = false;
          }
          return $content_fields;
      }, 50, 3 );

      Here I use maxlength property for the title field. You can learn more about this here – https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/maxlength

      Thanks!

Viewing 1 reply thread
  • You must be logged in to reply to this topic.