• Resolved Maxdo

    (@dceranic)


    Hello Bonjour

    J’ai un problème avec mon site woocommerce sur le formulaire mot de passe oublié. (lost-password). Le lien est bien envoyé sur la messagerie client du type https://monsite.com/wp-login.php?key=xxxx&login but the page returns to https://monsite.com/lost-password

    I am unable to change this and get the possibility to enter a new password.

    I use wordfence. No trace. WP fastest cache wp-login.php exclusion

    I use UQ Block country. None blocking wp-admin.php Ajax

    Using Store. No child theme.

    I try to put some code in store functions.php such as

    // Redirection pour utiliser la réinitialisation de mot de passe WordPress
    add_action('init', 'override_woocommerce_lost_password');
    function override_woocommerce_lost_password() {
    remove_action('woocommerce_before_lost_password_form', 'woocommerce_output_all_notices', 10);
    remove_action('woocommerce_account_lost-password_endpoint', 'woocommerce_lostpassword_endpoint', 10);
    remove_filter('woocommerce_lost_password_url', 'woocommerce_lost_password_url');

    add_filter('woocommerce_lost_password_url', function() {
    return wp_lostpassword_url();
    });
    }

    with no luck after having empty wp fastest cache. Woocommerce latest version. WordPress password reinit works well.

    Help !!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @dceranic ,

    I understand that you’re having trouble getting the lost password link to work correctly on your WooCommerce site. I get how frustrating this must be when you’re trying to provide a smooth experience for your customers.

    I would suggest checking any plugins could be interfering with the process. Since you’re using Wordfence and WP Fastest Cache, try temporarily deactivating them and see if the problem persists. Also, ensure that your custom code in functions.php is error-free and properly hooked.

    However, if you need further help with any custom code, please note that this falls outside our scope of support, in this case we recommend asking your development questions in the  WooCommerce Community Slack . Many of our developers are active there and can help. You can also get help from Codeable.io or WooExperts.

    If you’re still stuck, I’d would like to look into your site further, can you please share a copy of your site’s System Status Report so we can check your site’s current setup? You can find it by going to WooCommerce → Status, then selecting “Get system report” and clicking “Copy for Support.”

    Once you’ve done that, you can paste the text in here using the “<code>” block.

    Keep us posted on your progress.

    Thread Starter Maxdo

    (@dceranic)

    Hello

    Resolved. I check previous posts in forums. Well I resolved by putting in Woocommerce advanced tab. Put in blank field lost-password. This force password changes with wordpress process. I added some code in function.php to redirect the user to myaccount page when done.

    add_action( ‘after_password_reset’, ‘redirect_after_password_reset_wp’ );

    function redirect_after_password_reset_wp() {
        // Redirection vers la page Mon Compte de WooCommerce
        wp_safe_redirect( wc_get_page_permalink( ‘myaccount’ ) );
        exit;
    }

    Not the best way. I would have prefer to stay with woocommerce functionality (XStore makes html remplacements.) but I now works.

    Plugin Support Rajesh K. (woo-hc)

    (@rajeshml)

    Hello @dceranic,

    Glad to know that you were able to resolve the issue and thank you for sharing the solution and contributing to the WooCommerce Community.

    Please let us know if there’s anything else we can do to help or if you have any questions.

    Cheers!

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

The topic ‘Lostpassword Woocommerce’ is closed to new replies.