Created
February 8, 2018 18:26
-
-
Save kimcoleman/41f84b6c46189ad308209c68c7ba016d to your computer and use it in GitHub Desktop.
Change the text of the discount code area on membership checkout for almacartney
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 | |
//Change the text of the discount code area on membership checkout | |
function my_pmpro_discount_code_toggle( $translated_text, $text, $domain ) { | |
if( $domain == 'paid-memberships-pro' ) { | |
$translated_text = str_replace( 'Click here to enter your discount code', 'Have a discount code?', $translated_text); | |
$translated_text = str_replace( 'Do you have a discount code?', '', $translated_text); | |
} | |
return $translated_text; | |
} | |
add_filter( 'gettext', 'my_pmpro_discount_code_toggle', 10, 3); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment