Issue
How to hide product "Description" tab' in Woocommerce plugin only for unlogged users, but visible for registered customers (and logged-in users).
Solution
To remove product description tab on sigle product pages for non logged users, you will use:
add_filter( 'woocommerce_product_tabs', 'customize_product_tabs', 100 );
function customize_product_tabs( $tabs ) {
if ( ! is_user_logged_in() ) {
unset( $tabs['description'] ); // remove the description tab
}
return $tabs;
}
This code goes in functions.php file of your active child theme (or active theme). Tested and works.
Answered By - LoicTheAztec Answer Checked By - Mildred Charles (PHPFixing Admin)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.