• Resolved Avinash Patel

    (@avinashdigitl)


    We’ve noticed that WooCommerce is not automatically cancelling unpaid “Pending” orders after the configured timeout period of 60 minutes. There are multiple examples of orders still marked as pending months after being placed, even though they were never completed or paid for. This is causing concern around stock management, as it appears customers may be able to return to these old carts and successfully place orders for products that are no longer in stock.

    In one case, a customer placed an order that was marked as “Completed” despite no payment being made. The same customer later paid for a separate order, which suggests the first attempt timed out but still remained active. This could indicate that expired orders are not being properly cancelled, allowing products to be oversold when inventory has already run out. We’d like to understand why the automatic cancellation is not working as expected and whether this could be allowing stock to be reserved or bypassed.

    Can you please investigate why pending orders are not cancelling after 60 minutes as configured, and whether there is a way to enforce stricter stock validation at checkout to prevent such issues?

    https://prnt.sc/luru105521xm

Viewing 15 replies - 1 through 15 (of 15 total)
  • Hi @avinashdigitl,

    We understand your concern regarding unpaid “Pending” orders not automatically canceling and the potential impact on stock management.

    The automatic cancellation of “Pending” orders relies on a system called WP-Cron. This is WordPress’s way of handling scheduled tasks, like clearing out old unpaid orders. If WP-Cron isn’t firing consistently on your server, these scheduled cancellations won’t happen as expected.

    To help us investigate this further, please:

    1. Check your server’s WP-Cron status: Your hosting provider can help you verify if WP-Cron is running reliably. Sometimes, server-level settings or heavy traffic can interfere with its execution.
    2. Review your WooCommerce logs for fatal errors: Please navigate to WooCommerce > Status > Logs in your WordPress dashboard. Look for any “Fatal error” entries around the time the orders should have been canceled. If you find any, please copy and paste the content to https://gist.github.com/ and share the link with us.

    Once we address the WP-Cron issue, the stock management should function as intended.

    Let us know what you find out.

    Thread Starter Avinash Patel

    (@avinashdigitl)

    Hello, we have checked with our hosting provider, and they have confirmed Cron is working fine. Let me know if you need more details from our side.

    https://prnt.sc/OmUlhgw0Mdhc

    Plugin Support shahzeen(woo-hc)

    (@shahzeenfarooq)

    Hi there,

    Thanks for confirming that WP-Cron is working fine.

    To better understand what’s happening, could you please confirm whether this issue is affecting all pending orders, or only specific ones?

    If it’s limited to certain orders, it would be helpful to check if there’s anything in common between them — for example, the payment method used or any customizations in place that might prevent the cancellation from being triggered.

    Additionally, to assist you further, could you please share a copy of your System Status Report?
    You can find it by going to WooCommerce → Status, then scroll down and click “Get system report”Copy for support.

    Once we have more information, we’ll be able to assist you further

    Thread Starter Avinash Patel

    (@avinashdigitl)

    Here is system report:

    https://gist.github.com/digitlavinash/2d3d76d7a38006ebaf9df98a62362a10

    orestiszouras

    (@orestiszouras)

    Hello, we have been experiencing the same with our website today. The timer for auto-cancel is set at 15 minutes but it went well beyond that and the unpaid order was not canceled. I haven’t checked with my provider regarding Cron yet but will do and follow up here with a system report if you’d like, that might help along with OP’s to locate any problems with this action.

    Hi @avinashdigitl,

    Thank you for sharing the report. I’d also appreciate it if you could respond to the questions previously asked by @shahzeenfarooq, as that information will help us better understand the issue.

    To better understand what’s happening, could you please confirm whether this issue is affecting all pending orders, or only specific ones?

    If it’s limited to certain orders, it would be helpful to check if there’s anything in common between them — for example, the payment method used or any customizations in place that might prevent the cancellation from being triggered.

    I’ve also reviewed your status report, and while nothing unusual stands out, I did notice some customizations through code snippets and custom fields. Before we dive deeper, I’d like to confirm whether this issue occurs with all unpaid pending orders or just with a specific few. If it’s only certain orders, do they share anything in common—such as the same payment method, specific products, or products from the same category?

    Thread Starter Avinash Patel

    (@avinashdigitl)

    To better understand what’s happening, could you please confirm whether this issue is affecting all pending orders, or only specific ones?
    => This issue has occurred in several orders over the past few weeks.

    If it’s limited to certain orders, it would be helpful to check if there’s anything in common between them — for example, the payment method used or any customizations in place that might prevent the cancellation from being triggered.
    => There is no common pattern; all orders were attempted using card payments. I’ve shared notes from some of the affected orders below.

    https://prnt.sc/HbzPZXevbZAs
    https://prnt.sc/tMbJ5AAf7DV8
    https://prnt.sc/xadv8_Z5SXkq
    https://prnt.sc/LAhuSaU923gd

    Hi @avinashdigitl,

    Thank you for the detailed update! Let’s dig a bit deeper. Please head over to WooCommerce → Status → Scheduled Actions, and search for woocommerce_cancel_unpaid_orders. These scheduled tasks are what WooCommerce uses to automatically cancel unpaid orders after the timeout period. If you don’t see them, or they’re stuck as “pending” or “failed,” that would explain why the cancellations aren’t happening.

    To inspect this more closely, you can also install the free WP Crontrol plugin. It gives you visibility into all cron jobs running on your site, so you can check if WooCommerce is correctly queuing and executing the cancellation jobs.

    In addition to that, here are a couple more steps you can try:

    • Resave your inventory settings: Go to WooCommerce → Settings → Products → Inventory and simply click “Save changes” again. This can help reset the timeout logic if something got stuck.
    • Clear your browser and server-side cache, and temporarily disable any caching or optimization plugins you may have active. Sometimes caching plugins can interfere with background tasks or cause outdated settings to persist.

    Let us know what you find!

    Thread Starter Avinash Patel

    (@avinashdigitl)

    Hello, i have deleted all caching plugins, and i can see below information, will it will mark these 4 orders as cancelled?

    Cron Event (woocommerce_cancel_unpaid_orders): https://prnt.sc/S_IQfyTiAuhP
    Order that need to mark as cancelled: https://prnt.sc/flf_wK3XA3EY

    Hi @avinashdigitl,

    Yes, it should mark the unpaid orders as canceled. Could you please confirm whether it successfully ran? If it did not, did it fail or just show up as pending?

    Thread Starter Avinash Patel

    (@avinashdigitl)

    Hi, I noticed the behavior below. Do we need to keep the site open for this process to run, or does it run automatically in the background? Also, is there a way to verify if the cron job executed successfully and how many orders were marked as cancelled?

    https://prnt.sc/LbY0_emfK7b8

    Hi @avinashdigitl,

    The process runs automatically in the background using a scheduled cron job, so you don’t need to keep the site open for it to work.

    To verify if the cron job executed successfully, you can check your order list for recently cancelled orders. This will show how many orders were marked as cancelled. If you have a plugin like WP Crontrol, you can view scheduled cron jobs and their last run times.

    Let me know if you have any other questions.

    Thread Starter Avinash Patel

    (@avinashdigitl)

    Hi,

    We have a few orders that should be marked as Cancelled, but they are not updating as expected (screenshot: https://prnt.sc/irJ7Cm6PmQoL).

    Would it be helpful if I created an admin user for you to access the site backend and investigate further?

    Hi @avinashdigitl,

    Thank you for getting back. Just to clarify — sharing passwords isn’t permitted on the forum since it’s a public space, and we provide support exclusively through the forum for security reasons.

    Regarding the cancelled order you’re still seeing, I noticed the date is still set back to the 17th. Please update this manually to “cancelled,” and now that you’ve run the actions, let’s monitor things from today moving forward.

    Feel free to reach out if you have any other questions!

    Plugin Support LovingBro (woo-hc)

    (@lovingbro)

    Hi there,

    As there’s been no follow-up, I’ll consider this resolved for the time being. We’re happy to jump back in if anything comes up!

    If WooCommerce has been useful for your store and you appreciate the support you have received, we’d truly appreciate it if you could leave us a quick 5-star review here: https://wordpress.org/support/plugin/woocommerce/reviews/#new-post

Viewing 15 replies - 1 through 15 (of 15 total)

The topic ‘Pending Orders Not Automatically Cancelled After Timeout’ is closed to new replies.