A WooCommerce order sits on “Pending payment” from the moment the customer places it until the payment gateway tells your store the money arrived. If it stays there, either the customer never finished paying, or they paid and the gateway’s confirmation never reached your store or was rejected. WooCommerce only cancels these orders by itself when stock management is on and the “Hold stock” time has passed, and only for orders placed through the checkout. Every other pending order waits until you deal with it.
This guide explains what the status means, how to tell an unpaid order from a paid one that did not update, the exact rules WooCommerce uses to cancel unpaid orders, and how to stop orders getting stuck.
What does “Pending payment” mean in WooCommerce?
WooCommerce’s guide to order statuses defines it as an order that has been received, but no payment has been made. A normal paid order moves from Pending payment to Processing, then to Completed once you ship it. An order where every product is both virtual and downloadable goes straight to Completed, because it needs no processing.
Two things follow from the status:
- No emails go out. WooCommerce’s email troubleshooting guide says a pending payment order triggers no email. You do not get the new order email and the customer gets no confirmation until the order changes to Processing or On hold.
- Stock is held, not reduced. We read the WooCommerce source. It reduces stock when a payment completes or an order moves to Processing, Completed or On hold. A pending order only holds its items for the “Hold stock” time.
If you use the newer block checkout, you may also see Draft orders. Those are temporary records WooCommerce makes while the customer is still on the checkout page. They appear only on the Draft tab of the orders screen and are not the same as pending orders.
Why do orders get stuck on pending payment?
Every stuck order falls into one of two groups. The fix depends on which group it is in, so find that out first.
The customer did not pay. This is the most common reason. The customer reached the gateway’s payment page and then:
- closed the tab or lost their connection,
- had the card declined,
- did not finish the OTP or 3D Secure step,
- or changed their mind.
WooCommerce’s email guide lists abandoned payment pages and declined cards as the usual causes, and adds that the exact behaviour depends on the gateway. That is why one declined card can show up as Failed and another as Pending payment.
The customer paid, but your store never heard about it. The gateway took the money and sent a confirmation to your site, and that confirmation was blocked, lost or rejected. WooCommerce’s email guide says that paid orders stuck on Pending payment mean the gateway is having trouble talking to your site.
How do you tell whether the customer actually paid?
Do not go by what the customer says, and do not go by your thank you page. Check the money itself:
- Open the order and read its notes. Many gateway plugins write a note when a payment result comes in. A note with an error or a failed check means the confirmation arrived and your store rejected it. No note at all usually means it never arrived.
- Search your gateway’s merchant dashboard for the order number and amount. If the payment shows there as successful, the customer paid.
- Ask the customer for the transaction ID from their bank SMS or wallet app, if the dashboard search finds nothing. Then match it in the dashboard.
If the gateway shows no successful payment, treat the order as unpaid. If it shows one, the problem is the confirmation between the gateway and your store.
Why does a paid order not update?
We built the card checkout on this site on PayFast’s hosted payment page, so we can describe that side from our own code. The order stays pending until PayFast’s result reaches the store. The result arrives twice, once through the customer’s browser and once directly from PayFast’s server. The store checks a signature made with the merchant’s secured key, and only a matching signature with result code 000 marks the order paid. Any other code, or a signature that does not match, leaves it pending.
Other gateways use different names, but they work the same way. That means a paid order stays pending when:
- A firewall, security plugin or bot check blocks the gateway’s server from reaching your callback address.
- Maintenance or “coming soon” mode blocks every visitor, the gateway’s server included.
- The key in your gateway settings is wrong, so every signature check fails.
- A page cache answers the callback address with a saved page instead of passing it to WooCommerce.
- Your WordPress address still starts with http, so the return and callback addresses point to the wrong place.
Our PayFast setup guide for WooCommerce goes through these checks for PayFast in detail.
When does WooCommerce cancel pending orders automatically?
The setting is “Hold stock (minutes)” under WooCommerce, Settings, Products, Inventory. WooCommerce’s products settings guide says that when the limit is reached, the pending order is cancelled and its held stock goes back into inventory. Leave it blank to turn this off. The guide also notes that it only applies to Pending payment orders, not to orders On hold.
We read the function that does the cancelling, wc_cancel_unpaid_orders in WooCommerce 11.3.0. Its rules are stricter than the setting’s label suggests:
- Stock management must be on. If “Enable stock management” is unticked, the function returns at once and cancels nothing, whatever the hold time says.
- The hold time must be at least one minute. The default on a new store is 60.
- It only looks at orders not updated within the hold time. The clock runs from the order’s last change, not from when it was created.
- It only cancels orders from the checkout. Orders created by the classic checkout or the block checkout are cancelled. Orders you created in the admin, orders created through the REST API and orders made by other plugins are left alone.
- It runs as a scheduled job, and each run schedules the next one, one hold period later.
A cancelled order gets the note “Unpaid order cancelled – time limit reached.” The status change also sends the Cancelled order email, which goes to the site’s admin address unless you set other recipients.
What did our test store show?
We checked those rules on a fresh test store, WooCommerce 11.3.0 on WordPress 7.1.4 in Docker. We set “Hold stock” to one minute and created four pending orders for the same product. One was marked as coming from the classic checkout, one from the block checkout, one from the admin screen and one from the REST API.
- Before the minute was up, the job ran and left all four pending.
- After the minute, it cancelled the two checkout orders with the “time limit reached” note and left the admin and REST API orders on Pending payment.
- With stock management turned off, we repeated the test with four new orders. After the minute, the job cancelled none of them, and it did not schedule another run.
That last result is worth knowing. If you sell services or digital products and turned stock management off, WooCommerce does not clean up unpaid orders at all. They stay on Pending payment until you cancel them.
Why might the automatic cancel run late or never?
WooCommerce runs this job through Action Scheduler, its background job queue. Action Scheduler’s FAQ says it is started by WP-Cron by default, and WordPress’s cron documentation says WP-Cron only runs when someone loads a page. On a quiet store, a job due at 2 o’clock may not run until the next visit.
To check, open WooCommerce, Status, Scheduled Actions (also under Tools, Scheduled Actions) and search for woocommerce_cancel_unpaid_orders. A pending action whose scheduled time is long past means the queue is not running. A server cron job that calls WordPress’s cron every few minutes fixes this. Ask your host how to set one up.
What happens if the payment arrives after the order was cancelled?
It can still go through. In the WooCommerce source, the function gateways call to mark an order paid, payment_complete, accepts orders that are pending, failed, on hold or cancelled. In our test store we called it on one of the orders the job had just cancelled, and the order moved from Cancelled to Processing.
Whether this happens on your store depends on the gateway plugin, because some plugins check the status themselves before they call that function. Two practical points:
- Keep the hold time longer than the gateway’s payment window. A customer who takes ten minutes to find their OTP should not come back to a cancelled order. If you do not know how long your gateway’s payment page stays open, ask the gateway before you lower the default of 60 minutes.
- Check the stock on late payments. Cancelling returns the held stock. If you sell the last item to someone else in between, a late payment can leave you with an order you cannot fill.
How do you fix a stuck order by hand?
If the gateway shows the payment as successful:
- Open the order and change its status to Processing.
- Add a private note with the gateway’s transaction ID, so you can find it later.
- Save. Moving from Pending payment to Processing sends the new order email to you and the order confirmation to the customer, the same as an automatic update would.
- Then fix the confirmation problem from the section above, or the next paid order will get stuck too.
If the customer did not pay:
- Send them the payment link. While an order needs payment, WooCommerce shows a “Customer payment page” link next to the status on the order screen. A customer with an account also sees a Pay button for that order under My account, Orders.
- If they do not want it any more, change the order to Cancelled so the held stock goes back and your order list stays accurate.
Cash on delivery orders work differently. They skip Pending payment and go straight to Processing, or On hold when the order has a downloadable product, as our guide to setting up cash on delivery in WooCommerce explains, so a stuck pending order is always an online payment.
How do you stop orders getting stuck?
- Keep stock management on and leave “Hold stock” at a sensible number, so abandoned checkouts clean themselves up.
- Make sure scheduled jobs run, with a real server cron job if your store is quiet.
- Keep the callback address open. Exclude it, the cart and the checkout from page caching, and check that your firewall and security plugin let the gateway’s server through.
- Run the whole store on https, with both addresses under Settings, General starting with https.
- Test after every change to the gateway plugin, the cache or the firewall. Pay one small real order and check that it moves to Processing by itself.
If you are still picking a gateway, our guide to accepting online payments on WooCommerce in Pakistan compares the options.
Frequently asked questions
Why is my WooCommerce order pending payment when the customer paid?
The gateway’s confirmation did not reach your store, or your store rejected it. Check for a firewall or security plugin blocking the callback, maintenance mode, a cache on the callback address, or a wrong key in the gateway settings.
How long does WooCommerce keep an order on pending payment?
With stock management on, it cancels checkout orders once they have gone unchanged for the “Hold stock” time, 60 minutes by default. With stock management off, it never cancels them by itself.
Why did WooCommerce not cancel my unpaid order?
Stock management may be off, the “Hold stock” field may be blank, the order may have been created in the admin or by a plugin, or the scheduled job may not have run because the site had no visits.
Do pending payment orders send emails?
No. WooCommerce sends the new order email and the customer’s confirmation only when the order moves on to Processing or On hold.
Can I mark a pending order as paid myself?
Yes, once your gateway’s dashboard shows the payment. Change the status to Processing and add the transaction ID as a note. WooCommerce then sends the order emails.
