Last active
November 22, 2022 13:34
-
-
Save jameskoster/5133515 to your computer and use it in GitHub Desktop.
WooCommerce - Rename product data tabs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} |
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
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;
}`