Created
August 30, 2019 11:22
-
-
Save deeman/dceee271ac3c5ace26483991661805a8 to your computer and use it in GitHub Desktop.
WooCommerce: Rename Tags
This file contains hidden or 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
| // 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