Reply 322420 to: Change the default text/name of single product page tabs

Avatar: densitysk
densitysk
Participant
April 21, 2022 at 18:29

thank you. That will definitely help.

But these mention only the default tabs. Can you please let me know, how to add a line for the custom tabs created with your theme?

Renaming is easy, because I set the name of the tab when creating it. But when I want to change the order, I need to know how it is called in the theme.

For example I have created a custom tab called “Processing Time” and I would like to rearrange it to be on top of all tabs.

https://ibb.co/J2Xj7sX

Do you think the code below from Woocommerce help pages will work on this custom tab?

/**
* Reorder product data tabs
*/
add_filter( ‘woocommerce_product_tabs’, ‘woo_reorder_tabs’, 98 );
function woo_reorder_tabs( $tabs ) {

$tabs[‘processing_time’][‘priority’] = 5; // Processing first
$tabs[‘description’][‘priority’] = 10; // Description second
$tabs[‘additional_information’][‘priority’] = 15; // Additional information third
$tabs[‘reviews’][‘priority’] = 20; // Reviews fourth

return $tabs;
}

Go To The Whole Conversation In Topic
We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.