prevents automatic password generation when making the registration in the My Account page, closes #4672

This commit is contained in:
claudiosmweb 2014-02-11 17:50:55 -02:00 committed by Coen Jacobs
parent 50e863e268
commit f58f8672cc
1 changed files with 1 additions and 1 deletions

View File

@ -73,7 +73,7 @@ function wc_create_new_customer( $email, $username = '', $password = '' ) {
}
// Handle password creation
if ( get_option( 'woocommerce_registration_generate_password' ) == 'yes' && empty( $password ) ) {
if ( get_option( 'woocommerce_registration_generate_password' ) == 'yes' && empty( $password ) && ! isset( $_POST['register'] ) ) {
$password = wp_generate_password();
$password_generated = true;
} elseif ( empty( $password ) ) {