Why do my users get an “Incorrect Password” error after logging in?

Top WooCommerce & WordPress Plugins Forums Email Verification for WooCommerce Why do my users get an “Incorrect Password” error after logging in?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #101335
    Geanina
    Guest

    Hi,

    I have run into an error using this plugin with the following settings:

    Login the user automatically after the account is verified

    Block login from unverified users

    What actually happens:

    The user registers, they receive an email to activate their account, they follow the link in the email, the account is activated and they are automatically logged into the site. But if they log out and attempt to log in again, they cannot because they receive an “Incorrect Password” error.

    Please advise.

    Thank you!

    #108075
    Moshtafizur
    Moderator
    Plugin Support

    Hi Geanina,

    We wanted to know if you still needed help on the issue.

    Kind regards,
    Moshtafizur

    #122465
    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.

    #122467
    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 ago by netloger.
    #122481
    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
    #122591
    Moshtafizur
    Moderator
    Plugin Support

    Hi there,

    It seems that the behavior you’re encountering is related to WooCommerce’s password generation setting. The WooCommerce plugin has a feature that generates a new password for users upon account creation, and this new password is included in the new account email sent to the user.

    You correctly identified that disabling the ‘woocommerce_registration_generate_password’ setting in WooCommerce resolves this issue. By doing so, the system won’t generate a new password upon account creation, ensuring that the user’s existing password remains unchanged.

    It’s important to note that this behavior seems to be an aspect of how WooCommerce handles new account emails and password generation. Consequently, this issue does not appear to be caused by the email verification plugin.

    If you have any further questions or concerns, please  reach out to us.

    Kind regards,
    Moshtafizur

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.