Skip to content

Instantly share code, notes, and snippets.

@sabbirshawon
Created May 4, 2018 00:28
Show Gist options
  • Save sabbirshawon/4ceda5fad6edf8480726122b90af95c7 to your computer and use it in GitHub Desktop.
Save sabbirshawon/4ceda5fad6edf8480726122b90af95c7 to your computer and use it in GitHub Desktop.
rename woocommerce single product page tab
<?php
add_filter( 'woocommerce_product_tabs', 'woo_rename_tabs', 98 );
function woo_rename_tabs( $tabs ) {
$tabs['description']['title'] = __( 'Specifications' ); // Rename the description tab
$tabs['additional_information']['title'] = __( 'Ordering Information' ); // Rename the additional information tab
return $tabs;
}
add_filter( 'woocommerce_product_description_heading', 'rename_product_description_heading', 10, 1 );
function rename_product_description_heading( $heading ) {
return __( 'Specifications', 'woocommerce' );
}
add_filter( 'woocommerce_product_additional_information_heading', 'rename_product_additional_information_heading', 10, 1 );
function rename_product_additional_information_heading( $heading ) {
return __( 'Ordering Information', 'woocommerce' );
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment