• Steps :

    – Enable registration on the “Checkout” page
    – Enable registration on the “My Account” page
    – “My Account Endpoints” : Lost Password -> lost-user-password

    I override the ‘form-login.php’ and i create a new page template. The Lost password do not appear with the code below :

    <p class="lost_password">
    <a href="<?php echo esc_url( wp_lostpassword_url() ); ?>"><?php _e( 'Lost your password?', 'woocommerce' ); ?></a>
    </p>

    So, i replace with this :

    <a href="<?php echo esc_url( add_query_arg(array('key' => $reset_key, 'login' => rawurlencode($user_login)), wc_get_endpoint_url( 'lost-user-password', '', wc_get_page_permalink( 'lostuserpassword' ))));?>">
    <?php _e( 'Click here to reset your password', 'woocommerce' ); ?>
    </a>

    When i click in the “Click here to reset your password” then redirect me in the login page with the url of :

    'http://localhost/theme/login/lost-user-password/?login'

    The problem is that redirect me in the login page and not in the lost user password. I try to redirect in the other page like ‘shop’ and works.

    How can solve this?

    Thanks.

    https://wordpress.org/plugins/woocommerce/

Viewing 13 replies - 1 through 13 (of 13 total)
  • Thread Starter Mikem Nurai

    (@mikemikelle)

    I understand that the lost password is like a sub page in “My account page”. I add the “Lost user password” page template as parent in “My account page”. But when i want to view the page with the url :

    http://localhost/theme/my-account/lost-password/ not show me, show me the “My account page”, but when i remove the parent :

    http://localhost/theme/lost-password/, then i can view.

    Also i add the shortcode [woocommerce_lost_password] in the “Lost user password” page template.

    The problem still remain.

    Plugin Author Mike Jolley (a11n)

    (@mikejolley)

    woocommerce_lost_password shortcode does not exist any more. The endpoint is the only place it works, and this is always a child of my-account. Not a real page.

    If you have a lost password page, delete it.

    Thread Starter Mikem Nurai

    (@mikemikelle)

    @mike Jolley thanks for your answer. In my case is important to have the best feedback, because these days i am confused and i try to solve.
    I delete the page template. Also i make some updates in the code :

    <a href="<?php echo esc_url( add_query_arg( array( 'key' => $reset_key, 'login' => rawurlencode( $user_login ) ), wc_get_endpoint_url( 'lost-password', '', wc_get_page_permalink( 'login' ) ) ) ); ?>">
     <?php _e( 'Click here to reset your password', 'woocommerce' ); ?></a>

    But redirect me in the same page and not in the lost password page.

    Endpoints : Lost Password -> lost-password
    url : mytheme/login/lost-password/?login

    Plugin Author Mike Jolley (a11n)

    (@mikejolley)

    After deleting the page and settings > permalinks save, does the endpoint for lost password load?

    Thread Starter Mikem Nurai

    (@mikemikelle)

    As permalinks i have :
    Common Settings: Custom Structure : /blog/%postname%/
    Product permalink base : Default
    2nd case : Default all the settings, but the problem still remainning. Not load.

    Plugin Author Mike Jolley (a11n)

    (@mikejolley)

    Can I have a link to your account page?

    Thread Starter Mikem Nurai

    (@mikemikelle)

    The website is in localhost. What you suggest?

    Plugin Author Mike Jolley (a11n)

    (@mikejolley)

    I just want to know if you can get to /my-account/ and /my-account/lost-password/ directly now that the page has been removed.

    Thread Starter Mikem Nurai

    (@mikemikelle)

    Sorry for the delay. I post again. I have some serious problems and i don’t know the reason.
    – I download the default theme of “storefront” and when i activated, “my-account”, “lost password” page, work.
    – In my theme, i remove all the functions, templates (custom pages), WooCommerce folder with overriding files and inside i let only the basic files like index, css. But the problem still remaining.

    What i am doing wrong?

    Plugin Author Mike Jolley (a11n)

    (@mikejolley)

    What theme is it? Maybe it has other function files.

    My lost password link goes to wordpress lost password instead of woocommerce one… what can I do ? endpoint does work, but the link doesn’t.

    Regards

    Plugin Author Mike Jolley (a11n)

    (@mikejolley)

    It really depends what is outputting the link – it may be hardcoded.

    Hi,

    I also face same problem how to resolved. My lost password link goes to wordpress lost password instead of woocommerce one… what can I do ? endpoint does work, but the link doesn’t.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Lost password Endpoint & shortcode not working’ is closed to new replies.