DEV Community

Cover image for Rename WooCommerce tabs
Chris Texe
Chris Texe

Posted on

1

Rename WooCommerce tabs

Sometimes the default names of tabs are not fitted to our vision. So how to rename WooCommerce tabs? It's easy!

Put this code into your functions.php:

/**
* Rename product data tabs
*/
add_filter( 'woocommerce_product_tabs', 'woo_rename_tabs', 98 );
function woo_rename_tabs( $tabs ) {
// Rename the description tab
$tabs['description']['title'] = __( 'More Information' );
// Rename the reviews tab
$tabs['reviews']['title'] = __( 'Ratings' );
// Rename the additional information tab
$tabs['additional_information']['title'] = __( 'Product Data' );
return $tabs;
}
view raw functions.php hosted with ❤ by GitHub

If you don't have Reviews tab and/or Additional information tab in your store, just delete these lines:

$tabs['reviews']['title'] = __( 'Ratings' );
$tabs['additional_information']['title'] = __( 'Product Data' );
Enter fullscreen mode Exit fullscreen mode

If you leave these lines, you will see Additional information tab and Reviews tab in your store.

If you want more tips follow me on Twitter or visit my blog:

Top comments (0)

Retry later