Skip to content

Instantly share code, notes, and snippets.

@deeman
Created August 30, 2019 11:22
Show Gist options
  • Select an option

  • Save deeman/dceee271ac3c5ace26483991661805a8 to your computer and use it in GitHub Desktop.

Select an option

Save deeman/dceee271ac3c5ace26483991661805a8 to your computer and use it in GitHub Desktop.
WooCommerce: Rename Tags
// Rename "Tags" in Single Product Page - WooCommerce
add_filter('gettext', 'woo_translate_tag_taxonomy');
add_filter( 'ngettext', 'woo_translate_tag_taxonomy' );
function woo_translate_tag_taxonomy($translated) {
if ( is_product() ) {
// This will only trigger on the single product page
$translated = str_ireplace('tag', 'brand', $translated);
}
return $translated;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment