Issue displaying empty single products tabs
-
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.
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
Hello. Thank you for your response.
No issues appeared when switched to “Twenty Twenty-Five” theme.
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
Information is provided in Extra information (private).
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
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?
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
Hi!
Thank you for the answer. Problem is solved!
Hello,
You’re welcome! I’m here if you need additional guidance.
Take care!
Best Wishes
The topic ‘Issue displaying empty single products tabs’ is closed to new replies.