Forked from JustinSainton/use-email-for-login-woocommerce.php
Created
January 10, 2018 08:14
-
-
Save deckerweb/d2e776fa9ddbe5d39dbd10292877a209 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