Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WC Appointment › Show/Hide Menu Tabs Based on Product Type
Tagged: frontend dashboard, menu tabs, product type
- This topic has 9 replies, 2 voices, and was last updated 6 years, 8 months ago by
WCFM Forum.
- AuthorPosts
- June 25, 2018 at 10:57 pm #25409
Sean Mac
ParticipantHi,
Is there any way to show/hide tabs based on the product type? When a vendor selects “Appointable product” from the frontend dashboard, I don’t want them to see certain menu tabs like “Inventory” and “Shipping”. For some reason, this is confusing to them no matter how many times I explain it.
Thank you in advance!
- June 26, 2018 at 8:34 am #25458
WCFM Forum
MemberHi,
Frankly, there is no such setting for these.
Actually, product tabs are automatically adjusted as product type changed. And it follow the same rule as in wp-admin -> add product.
Though for WCfM this can be manageable at a certain level. Add this code to your site and it will disable “Inventory” tab for Appointment product type –
function wcfm_pm_block_custom_class( $classes ) { $classes .= 'non-appointment'; return $classes; } add_filter( 'wcfm_pm_block_custom_class_stock', 'wcfm_pm_block_custom_class' ); add_filter( 'wcfm_pm_block_custom_class_shipping', 'wcfm_pm_block_custom_class' );
Thank You
- June 26, 2018 at 4:01 pm #25489
Sean Mac
ParticipantI tried the code you suggested but that doesn’t work. I’ve being trying to solve this now for 2 weeks and nothing seems to work. I will keep digging around for a solution because I really need to fix this. I really appreciate your assistance!
- June 26, 2018 at 5:11 pm #25494
WCFM Forum
MemberHi,
is this code does not disable “Inventory” tab for Appointment products?
What is your WCfM version?
Thank You
- June 27, 2018 at 2:58 am #25519
Sean Mac
ParticipantSorry for the delayed response. I saw an update notification and I’m now operating on version 4.1.6. The code you suggested works but unfortunately, it still doesn’t solve my issue because “Inventory” is not the only tab I need to hide for appointment product types.
Thanks again for your time and I’ll keeping looking for a solution.
- June 27, 2018 at 6:31 am #25524
WCFM Forum
MemberHi,
Can you please know me which are the other tabs you want to hide?
Thank You
- June 27, 2018 at 4:32 pm #25564
Sean Mac
ParticipantI would like to hide the following tabs when a vendor selects “Appointable product”:
Inventory
Shipping
Attributes - June 28, 2018 at 6:29 am #25594
WCFM Forum
MemberHi,
Here is your full code for the purpose –
function wcfm_product_manage_28_custom_virtual( $general_fields, $product_id, $product_type ) { if( isset( $general_fields['is_virtual'] ) ) { $general_fields['is_virtual']['class'] .= ' non-appointment'; $general_fields['is_virtual']['desc_class'] .= ' non-appointment'; } return $general_fields; } add_filter( 'wcfm_product_manage_fields_general', 'wcfm_product_manage_28_custom_virtual', 50, 3 ); function wcfm_pm_block_custom_class( $classes ) { $classes .= 'non-appointment'; return $classes; } add_filter( 'wcfm_pm_block_custom_class_stock', 'wcfm_pm_block_custom_class' ); add_filter( 'wcfm_pm_block_custom_class_shipping', 'wcfm_pm_block_custom_class' ); add_filter( 'wcfm_pm_block_custom_class_attributes', 'wcfm_pm_block_custom_class' );
Thank You
- June 28, 2018 at 3:18 pm #25623
Sean Mac
ParticipantTHANK YOU SO MUCH!
I was so reluctant about asking for this functionality in this forum because honestly this plugin is already awesome and I didn’t want to be greedy. 🙂
Again, I REALLY appreciate this. THANKS!!!
- June 28, 2018 at 3:46 pm #25624
WCFM Forum
MemberYou are welcome 🙂
Feel free to reach us anytime for any help.
Between, really thanks for the review, really pleasure 🙂
Thanks again!
- AuthorPosts
- The topic ‘Show/Hide Menu Tabs Based on Product Type’ is closed to new replies.