Skip to content

Instantly share code, notes, and snippets.

@ipokkel
Last active February 14, 2020 14:03
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ipokkel/143d332f958f01c582ba049c2bf9baf1 to your computer and use it in GitHub Desktop.
Save ipokkel/143d332f958f01c582ba049c2bf9baf1 to your computer and use it in GitHub Desktop.
Change text for auto renewal checkbox translation strings
<?php
// Add this code below to your PMPro Customizations plugin - http://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
add_filter( 'gettext', 'change_text_for_auto_renewal_checkbox', 20, 3 );
/**
* @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext
*/
function change_text_for_auto_renewal_checkbox( $translated_text, $text, $domain ) {
switch ( $translated_text ) {
case 'Would you like to set up automatic renewals?':
$translated_text = __( 'Do you want to set up automatic renewals?', 'pmproarc' );
break;
case 'Yes, renew at %s':
$translated_text = __( 'Yes, please renew at %s', 'pmproarc' );
break;
}
return $translated_text;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment