netloger

Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • netloger
    Participant

    Yeah, so need to disable woocommerce setting, and then it works. I think would be great to avoid creating new password if it already set.

    woocommerce_registration_generate_password
    netloger
    Participant

    Seems I found the reason, because plugin generates new password…and doesn’t matter, does user already setup a password.

    
    function maybe_send_wc_customer_new_account_email( $user_id ) {
    ...
    $customer_data = ( $password_generated = 'yes' === get_option( 'woocommerce_registration_generate_password', 'yes' ) ) ? array( 'user_pass' => $user_pass = wp_generate_password() ) : array();
    if ( $password_generated ) {
    add_filter( 'send_password_change_email', '__return_false' );
    wp_update_user( array( 'ID' => $user_id, 'user_pass' => $user_pass ) );
    ...
    • This reply was modified 8 months, 3 weeks ago by netloger.
    netloger
    Participant

    Hello, I am facing the same problem and I am unable to resolve it. I create a new user with wp_insert_user.

    I did some tests and observed that after the user follows the verification link, the password actually changes in the database.

Viewing 3 posts - 1 through 3 (of 3 total)