Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save JarrydLong/125233884950ae8db7161907bcb61a7f to your computer and use it in GitHub Desktop.
Save JarrydLong/125233884950ae8db7161907bcb61a7f to your computer and use it in GitHub Desktop.
<?php //do not copy
/**
* Translates to No Access message strings.
*
* Follow this guide to add this code to your site: https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*
*/
function pmpro_customizations_gettext($translated, $original, $domain) {
if($domain == 'paid-memberships-pro') {
if( $original == 'Membership Required' ) {
//Change to your translated string
return 'Membership Required Translation';
}
if( $original == ' You must be a member to access this content.' ) {
//Change to your translated string
return 'You must be a member to access this content. Translation';
}
if( $original == 'Already a member?' ) {
//Change to your translated string
return 'Already a member? Translation';
}
if( $original == 'Log in here' ) {
//Change to your translated string
return 'Log in here Translation';
}
}
return $translated;
}
add_filter('gettext', 'pmpro_customizations_gettext', 10, 3);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment