How could i hide the "Tax class" of each variable option?

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 How could i hide the "Tax class" of each variable option?

Tagged: 

Viewing 12 reply threads
  • Author
    Posts
    • #29748
      MOHO
      Participant

      I enable WooCommerce tax function, and use tax field,

      When the vendor add “Variations Options”, i see “Tax class” field in each variable option.

      I hide “Tax class” at simple product, but i can’t hide at variable product…

      because i can’t find out at my custom “wcfm-view-products-manage-tabs.php”.

      How could i hide this “Tax class”field?

      Attachments:
      You must be logged in to view attached files.
    • #29986
      WCFM Forum
      Keymaster

      Hi,

      Why you are not just disable “Tax” from capability?

      Thank You

    • #30005
      MOHO
      Participant

      Because we need to use “Tax” status option for each product.

      We just no need the vendor choose “Tax class”

      So i hide at simple product, but i can’t find out the way hide at variable option, thanks.

      How could i hide it?

      Attachments:
      You must be logged in to view attached files.
    • #30158
      WCFM Forum
      Keymaster

      Hi,

      Just add this code for the purpose –

      function wcfm_product_manage_fields_variations_hide_tax( $variation_fields ) {
      	if( isset( $variation_fields['tax_class'] ) ) {
      		$variation_fields['tax_class']['class'] = 'wcfm_custom_hide';
      		$variation_fields['tax_class']['label_class'] = 'wcfm_custom_hide';
      	}
      	return $variation_fields;
      }
      add_filter( 'wcfm_product_manage_fields_variations', 'wcfm_product_manage_fields_variations_hide_tax', 50 );

      Thank You

    • #30393
      MOHO
      Participant

      I test, but “Tax Class” field not hide.

      Could you check it?

      thanks

      Attachments:
      You must be logged in to view attached files.
    • #30528
      WCFM Forum
      Keymaster

      Opps! How this can be possible!

      I am checking this in your demo site.

      Between, do you change anything in template and this filter “wcfm_product_manage_fields_variations” when you override and edited that?

      Thank You

    • #30589
      MOHO
      Participant

      I’am not sure custom “wcfm_product_manage_fields_variations” or not.

      Only this include variations.

      I check “http://mall2.sites.moho.tw/admin/”

      Attachments:
      You must be logged in to view attached files.
    • #30798
      WCFM Forum
      Keymaster

      Hi,

      I have just added the same code using code snippet.

      And it’s working perfectly.

      Thank You

    • #30810
      MOHO
      Participant

      Yes it work in your code!

      function wcfm_product_manage_fields_variations_hide_tax( $variation_fields ) {
      if( isset( $variation_fields[‘tax_class’] ) ) {
      $variation_fields[‘tax_class’][‘class’] = ‘wcfm_custom_hide’;
      $variation_fields[‘tax_class’][‘label_class’] = ‘wcfm_custom_hide’;
      }
      return $variation_fields;
      }
      add_filter( ‘wcfm_product_manage_fields_variations’, ‘wcfm_product_manage_fields_variations_hide_tax’, 50 );

      This is you give before

      and you use “_59”, it work

      but if i upload live site, how could i know number????

      each site will different???

    • #30821
      WCFM Forum
      Keymaster

      Hi,

      Just relax and don’t worry about this number.

      I have already give you this function “wcfm_product_manage_fields_variations_hide_tax” so want to make function name unique and added this “_59” from today’s date 05/09/2018

      It does not matter at all!

      Thank You

    • #30861
      MOHO
      Participant
      This reply has been marked as private.
    • #30869
      WCFM Forum
      Keymaster

      Hi,

      I am also surprised with this, why codes are not working from your child theme ?

      Hope you understand, that code has no issue and it’s working!

      Thank You

    • #31144
      MOHO
      Participant

      Yes it work now, thanks!

      please close it.

Viewing 12 reply threads
  • The topic ‘How could i hide the "Tax class" of each variable option?’ is closed to new replies.