Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save andrewlimaza/18fee8a57c9c8e287ef012f67e15254a to your computer and use it in GitHub Desktop.
Save andrewlimaza/18fee8a57c9c8e287ef012f67e15254a to your computer and use it in GitHub Desktop.
Replace PMPro Social Login checkout text.
<?php
/**
* Replace the checkout text for PMPro's Social Login Add On.
* Follow this guide to add custom code to your site - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
function my_pmpro_social_login_text_replace( $translated_text, $text, $domain ) {
// Check if the domain and text match the target string
if ( $domain === 'pmpro-social-login' ) {
if ( $text === 'Click here to login, create a username and password' ) {
// Replace the text
$translated_text = 'Click here to create an account';
}
// Remove the "or" from the text.
if ( $text === 'or' ) {
$translated_text = '';
}
}
return $translated_text;
}
add_filter( 'gettext', 'my_pmpro_social_login_text_replace', 10, 3 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment