• Resolved Tom Palmer

    (@tompalmer999)


    The hide empty tabs snippet you posted works great, except I don’t want to hide empty Review tabs. Is there a snippet for that?

    Thanks for an awesome, useful plugin!

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Tracy Levesque

    (@liljimmi)

    ?????? YIKES, Inc. Co-Owner

    Hello @tompalmer999

    Can you please provide a link to the snippet you’re referring to?

    Thank you.
    -Tracy

    Plugin Contributor Tracy Levesque

    (@liljimmi)

    ?????? YIKES, Inc. Co-Owner

    Hello @tompalmer999,

    We haven’t heard back from you in a while so I am going to close out this ticket.

    If you need more help, please reopen it and we will be happy to help you.

    Thank you!
    -Tracy

    Thread Starter Tom Palmer

    (@tompalmer999)

    Hi Tracy, the code snippet I’m using to hide empty Custom Product Tabs is below. It works great, but I don’t want to hide empty Product Review tabs. Is there a modified snippet for that?

    Thanks, Tom

    // Remove Empty Tabs
    add_filter( ‘woocommerce_product_tabs’, ‘yikes_woo_remove_empty_tabs’, 20, 1 );

    function yikes_woo_remove_empty_tabs( $tabs ) {

    if ( ! empty( $tabs ) ) {
    foreach ( $tabs as $title => $tab ) {
    if ( empty( $tab[‘content’] ) && strtolower( $tab[‘title’] ) !== ‘description’ ) {
    unset( $tabs[ $title ] );
    }
    }
    }
    return $tabs;
    }

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Hide empty tabs except Reviews’ is closed to new replies.