Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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
You can’t perform that action at this time.