Skip to content

Instantly share code, notes, and snippets.

@artboard-studio
Last active December 23, 2015 15:59
Show Gist options
  • Save artboard-studio/6658751 to your computer and use it in GitHub Desktop.
Save artboard-studio/6658751 to your computer and use it in GitHub Desktop.
renaming woocommerce tabs the right way
<?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