title: Changing the URL for the "reset password" woocommerce
body: <p>I'm using WooCommerce on my website and I've created a custom login and a sign up page. Instead of seeing the standard <code>my-account</code> login page, new users are taken to a custom login page. This links to a custom register page if users click the link. </p>
  
  <p>Both these pages work fine. The problem comes when creating a <em>lost your password</em> section. Originally users would be taken to <code>my-account/lost-password</code> but since I wanted to build custom pages, I needed to create a new lost password page.</p>
  
  <p>I've got this page working correctly. Once a user has input their username or password and clicked the button, an email is sent to them with a url link that they need to click in order to be taken to the page that allows them to reset their password. This is where I'm having problems. </p>
  
  <p>Originally users would be taken to the <code>my-account</code> page but as I'm avoiding this, I want users to have to use my own custom page.</p>
  
  <p>The code in the email that specifies the url users need to go to is like so:</p>
  
  <pre><code>&lt;a class="link" href="&lt;?php echo esc_url( add_query_arg( array( 'key' =&gt; $reset_key, 'login' =&gt; rawurlencode( $user_login ) ), wc_get_endpoint_url( 'lost-password', '', wc_get_page_permalink( 'myaccount' ) ) ) ); ?&gt;"&gt;&lt;?php _e( 'Click here to reset your password', 'woocommerce' ); ?&gt;&lt;/a&gt;
  </code></pre>
  
  <p>How do i get the above url to point to my custom page and allow users to reset their password. I did manage to get the url to direct me to my own page but changing it to:</p>
  
  <pre><code>&lt;a class="link" href="&lt;?php echo esc_url( add_query_arg( array( 'key' =&gt; $reset_key, 'login' =&gt; rawurlencode( $user_login ) ), get_page_link(1839) ) ) ; ?&gt;"&gt;&lt;?php _e( 'Click here to reset your password', 'woocommerce' ); ?&gt;&lt;/a&gt;
  </code></pre>
  
  <p><strong>But</strong> it did not update the users password when they reset it.</p>
  
  <hr>
  
  <p><strong>UPDATE</strong>
  It seems that this issue is something to do with the <code>$reset_key</code> and <code>$user_login</code> not being passed to my custom form. When using:</p>
  
  <pre><code>&lt;a class="link" href="&lt;?php echo esc_url( add_query_arg( array( 'key' =&gt; $reset_key, 'login' =&gt; rawurlencode( $user_login ) ), wc_get_endpoint_url( 'lost-password', '', wc_get_page_permalink( 'myaccount' ) ) ) ); ?&gt;"&gt;
  </code></pre>
  
  <p>there are hidden inputs on my form that have values of <code>$reset_key</code> and <code>$user_login</code>, however, when using:</p>
  
  <pre><code>&lt;a class="link" href="&lt;?php echo esc_url( add_query_arg( array( 'key' =&gt; $reset_key, 'login' =&gt; rawurlencode( $user_login ) ), wc_get_endpoint_url( 'lost-password', '', wc_get_page_permalink( 'myaccount' ) ) ) ); ?&gt;"&gt;&lt;?php _e( 'Click here to reset your password', 'woocommerce' ); ?&gt;&lt;/a&gt;
  </code></pre>
  
  <p>these hidden inputs have no values.</p>
  
  <p>Is there a way to pass these parameters to my custom form, allowing the hidden inputs to be populated and the user's password be updated?</p>