Skip to content

Instantly share code, notes, and snippets.

@kimcoleman
Created February 8, 2018 18:26
Show Gist options
  • Save kimcoleman/41f84b6c46189ad308209c68c7ba016d to your computer and use it in GitHub Desktop.
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
<?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