Skip to content

Instantly share code, notes, and snippets.

@bekarice
Last active February 4, 2019 23:16
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bekarice/59353cbcd8b4a280c149 to your computer and use it in GitHub Desktop.
Save bekarice/59353cbcd8b4a280c149 to your computer and use it in GitHub Desktop.
Change wp-login.php login text
<?php // only copy if need
/**
* Changes the login text from what's set in our WooCommerce settings
* so we're not talking about checkout while logging in.
*
* @param string $login_text the original login text
* @return string updated login text
*/
function sv_wc_social_login_change_text_option( $login_text ) {
global $pagenow;
// Only modify the text from this option if we're on the wp-login page
if( 'wp-login.php' === $pagenow ) {
// Adjust the login text as desired
$login_text = __( 'You can also create an account with a social network.', 'my-textdomain' );
}
return $login_text;
}
add_filter( 'pre_option_wc_social_login_text', 'sv_wc_social_login_change_text_option' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment