Skip to content

Instantly share code, notes, and snippets.

@kimwhite
Last active June 3, 2024 13:11
Show Gist options
  • Save kimwhite/30112dc921ed65183218063b93948fff to your computer and use it in GitHub Desktop.
Save kimwhite/30112dc921ed65183218063b93948fff to your computer and use it in GitHub Desktop.
Change You have selected the on the checkout page
<?php // Do not copy this line
/**
* This recipe will change the text on our checkout page.
*
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
* Read this companion article for step-by-step directions on either method.
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
add_filter( 'gettext', 'change_my_text_example', 20, 3 );
/**
* @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext
*/
function change_my_text_example( $translated_text, $text, $domain ) {
switch ( $translated_text ) {
case 'You have selected the %s membership level.' : // This is what we want to change
$translated_text = __( 'Du hast die Mitgliedsstufe %s ausgewählt.', 'paid-memberships-pro' );// this is our change
break;
}
return $translated_text;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment