Thread Starter
dahnnn
(@dahnnn)
Apparently, when you visit the site as a guest, it places the custom made tab outside the
<div class=”woocommerce-tabs wc-tabs-wrapper”> and therefore it won’t open the tab content.
I found a (temporary?) solution to this, you have to give the tabs a fixed priority and put one of the main tabs (reviews, description or additional information) as the last one.
add_filter( 'woocommerce_product_tabs', 'wpb_reorder_tabs', 98 );
function wpb_reorder_tabs( $tabs ) {
$tabs['reviews']['priority'] = 5; // Reviews first
$tabs[test_tab]['priority'] = 10; // Test tab second
$tabs['description']['priority'] = 15; // Description third
$tabs['additional_information']['priority'] = 20; // Additional information fourth
return $tabs;
}
-
This reply was modified 9 years, 6 months ago by dahnnn.