WordPress at Your Fingertips
filter is not described

woocommerce_generated_customer_username filter-hook . WC 3.7.0

Filter generated customer username.


add_filter( 'woocommerce_generated_customer_username', 'filter_function_name_295', 10, 4 );
function filter_function_name_295( $username, $email, $new_user_args, $suffix ){
	// filter...

	return $username;
Generated username.
New customer email address.
Array of new user args, maybe including first and last names.
Append string to username to make it unique.


Since 3.7.0 Introduced.

Where the hook is called

woocommerce/includes/wc-user-functions.php 185-191
$new_args['first_name'] = apply_filters(
	'woo_user_' . zeroise( wp_rand( 0, 9999 ), 4 ),

Where in WP core the hook is used WooCommerce

Usage not found.