Replace register login name with email

Create a plugin to do this:

<?php
/**
 * Plugin Name: Smart WP Login Rex
 * Version: 0.0.1
 * Author: Rex Lo
 * Author URI: http://wp.wikirex.com/
 * Text Domain: smart-wp-login-rex
 * Description: Replace login name with email
 */

if(!function_exists('logg'))
{
	function logg($value, $stop=true)
	{
		if(is_array($value) == true || is_object($value) == true)
		{
			print('<pre>');
			print_r($value);
			print('</pre>');
		}
		else
		{
			echo var_dump($value);
		}

		if($stop == true)
		{
			exit();
		}
	}
}

//$hooks = $wp_filter['woocommerce_new_customer_data'];
//logg($hooks);

add_filter('woocommerce_new_customer_data', 'cb_customer_data', 30, 1); 
function cb_customer_data($data){
	$data['user_login'] = $data['user_email'];
	//logg($data);
	return $data;
}