Created
July 19, 2024 05:58
-
-
Save JarrydLong/125233884950ae8db7161907bcb61a7f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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