Add Product | product tags

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!

Viewing 5 reply threads
  • Author
    Posts
    • #27063
      wwsAdmin
      Participant

      Hello Team,

      As you know there is product tags in add product page. Can we have some fixed tags which will be shown. or how to replace in most used tags.

      Thanks

    • #27073
      WCFM Forum
      Member

      Hi,

      Yeah you can. Add this code to your site –

      function wcfm_product_custom_fields_tag( $tag_fields ) {
      	if( isset( $tag_fields['product_tags'] ) ) {
      		$tag_fields['product_tags']['attributes'] = array( 'readonly' => true );	
      	}
      	return $tag_fields;
      }
      add_filter( 'wcfm_product_simple_fields_tag', 'wcfm_product_custom_fields_tag' );

      Now, tag field is not editable and only way to select tags from “Choose from the most used tags”

      Thank You

    • #27083
      wwsAdmin
      Participant

      Hi,

      Actually vendor can enter tags but i wanted some tags which should be fixed (always show). and is there any limit like we have in category ?

      Thanks for the help.

    • #27091
      WCFM Forum
      Member

      Hi,

      OK, then don’t add that code.

      Add this code to set default fixed tags at the time of add product –

      function wcfm_product_custom_fields_tag( $tag_fields ) {
      	global $wp;
      	if( isset( $tag_fields['product_tags'] ) ) {
      		if( isset( $wp->query_vars['wcfm-products-manage'] ) && empty( $wp->query_vars['wcfm-products-manage'] ) ) {
      			$tag_fields['product_tags']['value'] = '';	// SET YOUR FIXED TAGS HERE
      		}
      	}
      	return $tag_fields;
      }
      add_filter( 'wcfm_product_simple_fields_tag', 'wcfm_product_custom_fields_tag' );

      But, there is no way yet to set limit. For textarea it’s not possible, hope you understand.

      Thank You

    • #27093
      wwsAdmin
      Participant

      Yes i understand thanks for the help really appreciate

    • #27098
      WCFM Forum
      Member

      Thank you 🙂

Viewing 5 reply threads
  • The topic ‘Add Product | product tags’ is closed to new replies.