Empty Tabs are not hidden

Home Page Forums WooCommerce Custom Tabs Empty Tabs are not hidden

Tagged: 

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author

    Posts

  • #1909

    Thyracont

    Participant

    Hi,

    I’ve got a problem. Also I put the mark on “Hide empty tabs” the empty tabs are still appearing.

    Example: http://thyracont-vacuum.com/products/vrcvrp-electronic-vacuum-switch/vrp-electronic-vacuum-switch-pirani/
    (Accessories Tab should be hidden as this is an accessory)

    Thank you for your Help!

    #1913

    WebshopLogic

    Keymaster

    Hi,

    Yes, this should be hidden. Please check the followings:
    – if this tab content is absolutely empty in the product edit page, so is must not contain any space, tab or other not visible characters
    – also check that Default Content, Content Header and Content Footer fields are absolutely empty on the “Accessories” tab type in the “Product Tabs” menu.

    A tab is hidden only if does not contain any character. It works for us without any problem.

    I hope this is the cause of the problem.

    Best Regards,
    Peter Rath
    WebshopLogic

    #1917

    Thyracont

    Participant

    Hi,

    I found the problem, but fixing it leads to another problem:

    I’m using WPML and wanted to translate the description of the custom tabs. For example “accessories” to “Zubehör”. As the description of the tabs isn’t shown in the string translation I added this code to my funtions.php:

    add_filter( ‘woocommerce_product_tabs’, ‘woo_rename_tabs’, 98 );
    function woo_rename_tabs( $tabs ) {

    $tabs[‘additional_information’][‘title’] = __( ‘Technical Data’ );
    $tabs[‘scope’][‘title’] = __( ‘Applications’ );
    $tabs[‘accessories’][‘title’] = __( ‘Accessories’ );

    return $tabs;

    }

    That way the custom tabs showed up on the string translation and I was able to translate them into german. But then the described problem with the empty tabs not hiding appeared. As I deleted this code again the tabs are hidden correctly but aren’t translated anymore.

    Could you please help me either to find a way to translate the custom tab names or to fix the problem if I use my workaround?

    Thank you!

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.