mirror of
https://gh.wpcy.net/https://github.com/mainwp/Code-Snippets-Functions.git
synced 2026-05-01 11:52:25 +08:00
9 lines
246 B
Text
9 lines
246 B
Text
function wcs_filter_password_auto( $args ) {
|
|
|
|
$new_password = wp_generate_password( 6, true, true );
|
|
|
|
$args['user_pass'] = $new_password;
|
|
return $args;
|
|
|
|
}
|
|
add_filter( 'woocommerce_new_customer_data', 'wcs_filter_password_auto' );
|