Hide tab when user is logged in?
-
Hi,
I’m trying to add a code snippet that hides the tab I created with this plugin when the user is logged in and visiting the product page.
This is the code:
add_filter( 'woocommerce_product_tabs', 'sb_woo_remove_appraisal_tab', 98); function sb_woo_remove_appraisal_tab($tabs) { if (is_user_logged_in()) unset($tabs['4706']); return $tabs; }
This works very well if I put a tab name like “description” where it says “4706”. “4706” is the tab ID that this plugin created. Sadly it doesn’t do anything.
How do I find out name to put in the code unset($tabs[‘HERE’]);
Would love to solve this, thank you!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Hide tab when user is logged in?’ is closed to new replies.