Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save JarrydLong/de46e719406ad1f7cab3f31180685142 to your computer and use it in GitHub Desktop.
Save JarrydLong/de46e719406ad1f7cab3f31180685142 to your computer and use it in GitHub Desktop.
Change text for add paypal express to checkout 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_add_paypal_express', 20, 3 );
/**
* @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext
*/
function change_text_for_add_paypal_express( $translated, $text, $domain ) {
switch ( $domain ) {
case 'pmpro-add-paypal-express':
switch ( $text ) {
case 'Check Out with a Credit Card Here':
$translated = __( 'Your translation here', 'pmpro-add-paypal-express' );
break;
}
break;
}
return $translated;
}
add_filter( 'gettext', 'change_text_for_add_paypal_express', 10, 3 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment