Home Forums WoodMart support forum Issue displaying empty single products tabs

Issue displaying empty single products tabs

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #634364

    Daniil
    Participant

    Hello!
    We are having display issues with product tabs on a single product page. If no information is assigned to the product tab, like additional information it shows empty accordions in mobile view and empty spaces in desktop.

    How to force ‘display:empty’ if no information is provided?

    Attachments:
    You must be logged in to view attached files.
    #634841

    Luke Nielsen
    Keymaster

    Hello,

    Could you please check how it behaves with default WordPress themes, such as WooCommerce Storefront, to help determine if the issue is related to our theme or not?

    Kind Regards

    #634917

    Daniil
    Participant

    Hello. Thank you for your response.

    No issues appeared when switched to “Twenty Twenty-Five” theme.

    #634957

    Luke Nielsen
    Keymaster

    Hello,

    In this case, send me the URL link to that product with the empty tabs and confirm the permission for plugins deactivation, switching to the parent/default theme for testing.

    Kind Regards

    #634981

    Daniil
    Participant

    Information is provided in Extra information (private).

    #635047

    Luke Nielsen
    Keymaster

    Hello,

    It seems that the issue is in the 3rd party code from the child theme, you can be sure of that by enabling the parent theme, then the issue is gone – https://prnt.sc/q1a_nd8W6s7T

    Kind Regards

    #635053

    Daniil
    Participant

    Thank you for checking the issue. I had only one code snippet in order to reorder custom tabs:

    add_filter( 'woocommerce_product_tabs', 'woo_reorder_tabs', 98  );
    function woo_reorder_tabs( $tabs ) {
    	$tabs['description']['priority'] = 5;
    	$tabs['additional_information']['priority'] = 15;
    	$tabs['wd_custom_tab']['priority'] = 10;
    	$tabs['reviews']['priority'] = 20;
    	return $tabs;
    }

    After disabling it the issue is gone.

    Do you know how I could change the order of WC and custom Woodmart product tabs?

    #635357

    Luke Nielsen
    Keymaster

    Hello,

    The thing is that the product does not always have e.g. the additional tab, but in your code, you added it. So you need to add a condition for such a tabs, here is an example – https://prnt.sc/SkWLwb224Pza

    Kind Regards

    #635602

    Daniil
    Participant

    Hi!

    Thank you for the answer. Problem is solved!

    #635618

    Luke Nielsen
    Keymaster

    Hello,

    You’re welcome! I’m here if you need additional guidance.

    Take care!

    Best Wishes

Viewing 10 posts - 1 through 10 (of 10 total)

The topic ‘Issue displaying empty single products tabs’ is closed to new replies.