• Resolved gabberman2

    (@gabberman2)


    Hi

    My site allows customers to create an account after the checkout and an email is sent automatically to “reset” the password. When I arrive on this page, the Save button has a “disable” variable on it.

    <button type="submit" class="woocommerce-Button button disabled" value="Save" disabled="disabled">Save</button>

    Is there an option to enable it in WooCommerce? I didn’t find anything from my theme. I noticed that the files related to that are woocommerce/assets/js/frontend/lost-password.js and woocommerce/assets/js/frontend/lost-password.min.js with the code in there.

    Any idea how to enable the Save button by default or I will need to play in CSS to bypass it?

    Thanks!

Viewing 9 replies - 1 through 9 (of 9 total)
  • Saif

    (@babylon1999)

    Hello @gabberman2!

    The button is usually disabled if the password entered doesn’t meet the WordPress requirement, such as if it’s too short.

    In such cases, a dynamic hint box is shown to alert the customer, but my guess is that your theme isn’t displaying it.

    To confirm this, try entering a strong password in both fields. If it works, you should contact your theme author for assistance. Alternatively, you can add your own hint using the woocommerce_after_reset_password_form hook.

    Cheers!

    Thread Starter gabberman2

    (@gabberman2)

    Good catch!! I tried a more strong password and indeed, the save button is enable. But if I don’t check with Dev Tools, I can’t see anything. Is there a plugin to display if the password is strong enough or not? in that case, the only thing is that the Save button can’t be clicked with no info at all. Even if the pwd are not the same.

    Thanks for your message! Appreciated 🙂

    Saif

    (@babylon1999)

    Is there a plugin to display if the password is strong enough or not?

    You don’t need a plugin. There should be a small hint box by default, but as I mentioned, it seems like your theme is not displaying it. Try switching to the Twenty Twenty-Four theme temporarily to see what I’m talking about. : )

    Thread Starter gabberman2

    (@gabberman2)

    You’re probably right and I also tried few plugins to manage the WooCommerce strength meter and I can’t see anything. Do you have any idea how I could add something? Even if it’s just a text under the password field to say: minimum xx characters, with a caps letter and a special character.

    Hi @gabberman2,

    WooCommerce does include a built-in strength meter and typically displays a message like “Very weak – Please enter a stronger password” below the password field. If that’s not showing, it’s likely that your theme is overriding or not loading the necessary styles or scripts.

    It would be a good idea to reach out to your theme’s support team to check if they’re affecting the default WooCommerce behavior.

    Thread Starter gabberman2

    (@gabberman2)

    Yes you right, It’s pretty much because of the theme I guess. Unfortunately, they don’t offer support anymore.

    Is there a way to look some files by myself to find the issue? If you can give me some advices which files to search in.

    Thank you!

    Saif

    (@babylon1999)

    Is there a way to look some files by myself to find the issue? If you can give me some advices which files to search in.

    WooCommerce already loads a password strength meter script on that page, so the issue is most likely due to:

    • Your theme is dequeuing that script (possibly for performance optimization), or
    • Your theme’s overridden code isn’t using the same selectors that the script expects.

    If you want to display a general message to prevent user confusion, you can try adding this snippet (though note it might not work if your theme has modified the template):

    add_action( 'woocommerce_after_reset_password_form', function() {
    echo '<p style="color: #d63638; font-weight: bold;">Please make sure you add a strong password with uppercase, lowercase letters, numbers, and symbols for better security.</p>';
    });

    Thread Starter gabberman2

    (@gabberman2)

    Thanks a lot! I finally added another plugin to manage this and other issues because of the theme. But it can be useful to keep this snippet in case I need it.

    Plugin Support shahzeen(woo-hc)

    (@shahzeenfarooq)

    Hi there!

    I’m glad the issue is resolved! If you’ve been happy with WooCommerce, we’d really appreciate it if you could take a moment to leave a review about the plugin. Your feedback helps other users and supports the continued improvement of WooCommerce!

    👉 Leave a review for WooCommerce

    Thank you for using WooCommerce!

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Reset password and Save button disable’ is closed to new replies.