Created
June 24, 2016 09:58
-
-
Save andrewlimaza/8a497415f7596a3255ec42c8cc586d58 to your computer and use it in GitHub Desktop.
PMPRO change discount code text to promotional code for checkout
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 | |
| // Copy lines 5-25 to your active theme's functions.php or custom plugin. | |
| function change_discount_code_text( $translated_text, $text, $domain ) { | |
| switch ( $translated_text ) { | |
| case 'Discount Code' : | |
| $translated_text = __( 'Promotional Code', 'pmpro' ); | |
| break; | |
| case 'Click here to change your discount code' : | |
| $translated_text = __( 'Click here to change your promotional code', 'pmpro' ); | |
| break; | |
| case 'Do you have a discount code?' : | |
| $translated_text = __( 'Do you have a Promotional code?', 'pmpro' ); | |
| break; | |
| case 'Click here to enter your discount code' : | |
| $translated_text = __( 'Click here to enter your promotional code', 'pmpro' ); | |
| break; | |
| } | |
| return $translated_text; | |
| } | |
| add_filter( 'gettext', 'change_discount_code_text', 20, 3 ); | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment