Skip to content

Instantly share code, notes, and snippets.

@Acephalia
Created August 20, 2023 22:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Acephalia/3af737e1700dc9bb02f2643f645ce524 to your computer and use it in GitHub Desktop.
Save Acephalia/3af737e1700dc9bb02f2643f645ce524 to your computer and use it in GitHub Desktop.
Change WC Coupon Placeholder
function my_coupon_strings( $translated_text, $text, $domain ) {
switch ( $translated_text ) {
case 'Coupon code' :
$translated_text = __( 'My New Coupon Code Text', 'woocommerce' ); // Change text here
break;
}
return $translated_text;
}
add_filter( 'gettext', 'my_coupon_strings', 10, 3 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment