Last active
December 23, 2015 15:59
-
-
Save artboard-studio/6658751 to your computer and use it in GitHub Desktop.
renaming woocommerce tabs the right way
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
<?php | |
add_filter( 'woocommerce_product_tabs', 'capitalh_rename_tabs', 98 ); | |
function capitalh_rename_tabs( $tabs ) { | |
if ( isset($tabs['description']) ) { | |
$tabs['description']['title'] = __( 'New Title', 'une_boutique' ); // Rename the description tab | |
} | |
if ( isset($tabs['reviews']) ) { | |
$tabs['reviews']['title'] = __( 'New Title', 'une_boutique' ); // Rename the reviews tab | |
} | |
if ( isset($tabs['additional_information']) ) { | |
$tabs['additional_information']['title'] = __( 'New Title', 'une_boutique' ); // Rename the additional information tab | |
} | |
return $tabs; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment