Skip to content

Instantly share code, notes, and snippets.

@rickgregory
Forked from Acephalia/wccptxt.php
Created April 12, 2024 23:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rickgregory/b09bbdd5176c0ae0b6f7b6f24fed8408 to your computer and use it in GitHub Desktop.
Save rickgregory/b09bbdd5176c0ae0b6f7b6f24fed8408 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