Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM › Hiding Fields/Options in "Add Product" page
- This topic has 6 replies, 3 voices, and was last updated 6 years, 9 months ago by Bingal.
- AuthorPosts
- March 9, 2018 at 3:42 pm #20023JayGuest
Hi,
I would like to hide some fields for vendors when they add/edit product.
Specifically, Menu Order from Advanced tab and Up-sell option from Linked tab.Can you provide code snippet to do this?
Thank you!
- March 9, 2018 at 3:50 pm #20029BingalMember
Hi,
Please first go through WCFM Capability, you may disable many of them from there.
Still if you have anything left, then please know me, will definitely give you code snippet for the purpose.
Thank You
- March 9, 2018 at 5:55 pm #20042JinGuest
I’ve went through the capability setting, I cannot disable individual field I listed.
For example, I can disable whole “Linked” tab but I cannot disable “upsell” option within “Linked” tab.
- March 9, 2018 at 6:55 pm #20047WCFM ForumMember
Hi,
Don’t worry, I will give you code for those.
Here is one for hiding “Menu Order” from Advanced tab –
function wcfm_product_manage_fields_advanced_manipulate( $advanced_fields, $product_id ) { if( wcfm_is_vendor() && isset( $advanced_fields['menu_order'] ) ) { $advanced_fields['menu_order']['class'] = 'wcfm_custom_hide'; $advanced_fields['menu_order']['label_class'] = 'wcfm_custom_hide'; } return $advanced_fields; } add_filter( 'wcfm_product_manage_fields_advanced', 'wcfm_product_manage_fields_advanced_manipulate', 50, 2 );
Thank You
- March 9, 2018 at 7:13 pm #20049WCFM ForumMember
Hi,
Here is the code for hiding “Up sells” option –
function product_manage_fields_linked_manipulate( $linked_fields, $product_id, $products_array ) { if( wcfm_is_vendor() && isset( $linked_fields['upsell_ids'] ) ) { unset( $linked_fields['upsell_ids'] ); } return $linked_fields; } add_filter( 'product_manage_fields_linked', 'product_manage_fields_linked_manipulate', 50, 3 );
Thank You
- March 9, 2018 at 7:25 pm #20051JinGuest
Thank you so much for your help!
It is now working as I wanted.
- March 10, 2018 at 6:24 am #20068BingalMember
Great … welcome 🙂
- AuthorPosts
- The topic ‘Hiding Fields/Options in "Add Product" page’ is closed to new replies.