Get the order id on Woocommerce checkout when order is already created but payment is pending


I’m finding out how WC get the order details when an order already created is attempting to be paid again (may be due a failure or when user cancels the payment and try to pay later). The current methods to get the order_id seems not work here. On web developers tools I noticed that the checkout page generates a GET response like this:


This data is showing up within the “File” columns on web developers tools.

… but I’m unable to “get” the order_id from that URL, isn’t like params that you can retrieve using GET methods. In fact, the real URL looks like https://{domain_name}/checkout/

I’m just need only that order_id… any ideas?

Diego Moreno 2 months 2022-09-27T16:38:02-05:00 0 Answers 0 views 0

Leave an answer