Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Ultimate › How could i hide the "Tax class" of each variable option?
Tagged: Tax class
- This topic has 12 replies, 2 voices, and was last updated 6 years, 5 months ago by
MOHO.
- AuthorPosts
- August 26, 2018 at 5:54 am #29748
MOHO
ParticipantI 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. - August 28, 2018 at 4:44 pm #29986
WCFM Forum
MemberHi,
Why you are not just disable “Tax” from capability?
Thank You
- August 28, 2018 at 8:29 pm #30005
- August 29, 2018 at 9:23 pm #30158
WCFM Forum
MemberHi,
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
- August 31, 2018 at 9:35 pm #30393
- September 2, 2018 at 5:29 pm #30528
WCFM Forum
MemberOpps! 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
- September 3, 2018 at 5:23 am #30589
MOHO
ParticipantI’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. - September 5, 2018 at 4:40 am #30798
WCFM Forum
MemberHi,
I have just added the same code using code snippet.
And it’s working perfectly.
Thank You
- September 5, 2018 at 5:30 am #30810
MOHO
ParticipantYes 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???
- September 5, 2018 at 6:10 am #30821
WCFM Forum
MemberHi,
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
- September 5, 2018 at 8:46 am #30861
MOHO
ParticipantThis reply has been marked as private. - September 5, 2018 at 9:17 am #30869
WCFM Forum
MemberHi,
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
- September 8, 2018 at 6:32 am #31144
MOHO
ParticipantYes it work now, thanks!
please close it.
- AuthorPosts
- The topic ‘How could i hide the "Tax class" of each variable option?’ is closed to new replies.