Skip to content

Instantly share code, notes, and snippets.

@sutandang
Created June 6, 2017 15:49
Show Gist options
  • Save sutandang/0ac4ba0499af3299f5544ae9853af8ff to your computer and use it in GitHub Desktop.
Save sutandang/0ac4ba0499af3299f5544ae9853af8ff to your computer and use it in GitHub Desktop.
edit label in wordpress
function my_custom_text_strings( $translated_text, $text, $domain ) {
switch ( $translated_text ) {
case 'Show all product types' :
$translated_text = __( 'Show all solutions types', 'woocommerce' );
break;
case 'Sort Products' :
$translated_text = __( 'Show Solutions', 'woocommerce' );
break;
case 'Product Data' :
$translated_text = __( 'Solutions Data', 'woocommerce' );
break;
case 'Product Categories' :
$translated_text = __( 'Solutions Categories', 'woocommerce' );
break;
return $translated_text;
}
add_filter( 'gettext', 'my_custom_text_strings', 50, 5 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment