Move Custom tab content on product page
-
Hi, i was wondering how can I move the custom tab to go infront of the additional information tab and behind the description tab. Currently it is the last tab. Thanks
Attachments:
You must be
logged in to view attached files.
Hello,
The default WooCommerce does not provide the option to modify the location of the tabs
You can find additional information here https://docs.woocommerce.com/document/editing-product-data-tabs/
Best Regards
Hi,
I’ve added the reordering code but nothing happened.
/**
* Reorder product data tabs
*/
add_filter( 'woocommerce_product_tabs', 'woo_reorder_tabs', 98 );
function woo_reorder_tabs( $tabs ) {
$tabs['description']['priority'] = 5; // Description first
$tabs['woodmart_custom_tab_tab active']['priority'] = 10; // woodmart custom second
$tabs['additional_information']['priority'] = 15; // Additional information third
$tabs['reviews']['priority'] = 20; // Reviews fourth
return $tabs;
}
Try to replace this line
$tabs['woodmart_custom_tab_tab active']['priority'] = 10;
with this one
$tabs['woodmart_custom_tab']['priority'] = 10;
Regards