title: How to retrieve order ID on Order Pay page in WooCommerce
body: <p>I am trying to modify the Woocomerce checkout page for orders that are failed or pending payment. On those orders the system comes to the checkout with an order already generated, but I am not able to retrieve the ID of that order from the <em>form_checkout.php</em> template.</p>
  <p>Failed orders can be paid by the customer with the Woocommerce URL, similar to the following one:</p>
  <pre><code>https://myurl.com/checkout/order-pay/XXXXX/?pay_for_order=true&amp;key=wc_order_XXXXXXXXXXXX&amp;subscription_renewal=true
  </code></pre>
  <p>Neither do I retrieve the variables with a $_GET since the URL is transformed into <em><a href="https://myurl.com/checkout" rel="nofollow noreferrer">https://myurl.com/checkout</a></em> when accessing. I don't know if you lose this data or where I can collect it.</p>
  <p>Is this possible?</p>