Created
December 7, 2020 10:42
-
-
Save cpaul007/3cd0dbcba6e4c2eb5fb137aab803fb4f to your computer and use it in GitHub Desktop.
Changing the placeholder text of coupon input field
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
<?php | |
add_filter( 'gettext_woocommerce', 'ouwoo_coupon_placeholder_text', 10, 3); | |
function ouwoo_coupon_placeholder_text( $translated_text, $text, $domain ) { | |
switch( $translated_text ) { | |
case 'Enter coupon code' : | |
$translated_text = "ENTER YOUR TEXT HERE"; | |
break; | |
} | |
return $translated_text; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment