Created
January 27, 2016 03:35
-
-
Save JustinSainton/b5551532dc6034d25f38 to your computer and use it in GitHub Desktop.
Use the submitted email address for the username in WooCommerce registration.
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 | |
add_filter( 'woocommerce_new_customer_data', function( $data ) { | |
$data['user_login'] = $data['user_email']; | |
return $data; | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Heya
Is this the write code you write above??
I want to change username in user email id and autogenerated password in his/her phone number in the below email template. Do you have any idea how i do it?
' . esc_html( $user_login ) . '' ); ?>
' . esc_html( $user_pass ) . '' ); ?>