Skip to content

Instantly share code, notes, and snippets.

@jameskoster
Last active November 22, 2022 13:34
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jameskoster/5133515 to your computer and use it in GitHub Desktop.
Save jameskoster/5133515 to your computer and use it in GitHub Desktop.
WooCommerce - Rename product data tabs
add_filter( 'woocommerce_product_tabs', 'woo_rename_tabs', 98 );
function woo_rename_tabs( $tabs ) {
$tabs['description']['title'] = __( 'More Information' ); // Rename the description tab
$tabs['reviews']['title'] = __( 'Ratings' ); // Rename the reviews tab
$tabs['additional_information']['title'] = __( 'Product Data' ); // Rename the additional information tab
return $tabs;
}
@TheJimmyX
Copy link

Guys, I was in this big mess with a page friend. She disabled whatever tab she want and gave me the warning. The problem was that the function was expecting something but it was disable. This worked for me.

`add_filter( 'woocommerce_product_tabs', 'woo_rename_tabs', 98 );

function woo_rename_tabs( $tabs ) {

if ( $tabs['description'] ) {
$tabs['description']['title'] = __( 'Descripción' );
}

if($tabs['reviews']){
$tabs['reviews']['title'] = __( 'Calificaciones' );
}

if( $tabs['additional_information'] ) {
$tabs['additional_information']['title'] = __( 'Información adicional' );
}

return $tabs;

}`

@Dfossils
Copy link

Hello all,
This great works for me in changing the tab name but it does not alter the Discription text just below it, just above the text from the product page. Please see picture if im not that clear. http://i204.photobucket.com/albums/bb44/ClassicMullet/discription%202_zps1rjiksnu.png
Im pretty new to all this so please bear with me. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment