• Resolved millerml

    (@millerml)


    An order was placed without payment being completed in status – “Awaiting BACS payment”. Then – Order status changed from “Awaiting payment” to “On hold”. Product inventory balance was changed in the system: it went from 1 to 0 (1→0). Then the product status was changed to “Completed”. However, after that, on the product card the remaining stock still showed as 1. As a result, logged-in users can still see this item as available and in stock, while for users who are not logged in (guest visitors) the same product appears to be missing or unavailable. In other words, there is a discrepancy between what the product page indicates and what different types of visitors actually see in the catalog: authorized users see the item as in stock and available for purchase, but non-authorized users do not see it at all, as if it is out of stock or removed from public visibility.

    Could you please advise what the reason might be for this behavior? We are trying to understand why the stock level on the product card remained at 1 after the order was placed and the inventory was supposedly reduced to 0, and why availability differs depending on whether the visitor is logged in or not. We would appreciate clarification on what could cause the stock to be displayed inconsistently between the product card and the storefront, as well as between authenticated and non-authenticated users, and what settings, rules, or processes might lead to this situation.

    WooCommerce: 10.4.3
    WordPress: 6.9
    I use caching plugins Redis Object Cache 2.7.0, but clearing the cache doesn’t help and I don’t understand how this could be related to the cache?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Sai (woo-hc)

    (@saivutukuru)

    Hi @millerml,

    Thanks for the details.

    A few quick things to check first, as this behavior is usually caused by configuration or visibility rules rather than a stock bug:

    • Is Manage stock enabled on this product?
    • Under WooCommerce → Settings → Products → Inventory, is “Hide out of stock items from the catalog” enabled?
    • For BACS orders, when is stock set to reduce — order placed or payment complete?

    The difference between logged-in and guest users typically points to catalog visibility, user-role rules, or a plugin/theme condition affecting product queries.

    Redis Object Cache usually doesn’t cause this by itself, but stale product lookup tables or transients can. If not already done, try regenerating product lookup tables and clearing WooCommerce transients.

    Please share the answers above so we can narrow this down.

    Thread Starter millerml

    (@millerml)

    Hi. Thanks for the answer.

    Is Manage stock enabled on this product?

    Yes.

    Under WooCommerce → Settings → Products → Inventory, is “Hide out of stock items from the catalog” enabled?

    Yes

    For BACS orders, when is stock set to reduce — order placed or payment complete?

    When order placed

    try regenerating product lookup tables and clearing WooCommerce transients.

    Yes, I did it.

    The store has been work for 2 years. This kind of situation has never happened before. In the product card balance is remained “1”. I don’t understand why?

    Thread Starter millerml

    (@millerml)

    I found attribute – WooCommerce → Settings → Products → Advanced, “Direct updates” – its disabled. Maybe this is the reason?

    Add… After some time, the remainder changed to 0 and everything started working correctly. Why?

    • This reply was modified 4 months ago by millerml.
    Sai (woo-hc)

    (@saivutukuru)

    Hi @millerml,

    Good catch, yes, that explains the behavior.

    When WooCommerce → Settings → Products → Advanced → “Direct updates” is disabled, WooCommerce does not immediately write stock changes to the database. Instead, updates are queued and processed later via background actions (Action Scheduler / cron).

    That’s why you saw:

    • Stock temporarily still showing as 1 on the product
    • Different behavior for logged-in vs guest users (they rely on different cached/product lookup data)
    • The stock correcting itself to 0 after some time, once the background process completed

    This is expected behavior when Direct updates are disabled and not a bug in core WooCommerce.

    If you need instant stock updates, especially for low-stock or single-quantity products, enabling Direct updates is recommended. Otherwise, make sure WP-Cron is running reliably so queued updates don’t get delayed.

    Let us know if you notice it happening frequently or with delays longer than expected.

    Thread Starter millerml

    (@millerml)

    Yes, I have low-stock or single-quantity products, but I haven’t noticed this before. We have more than 10,000 products… WP-Cron runs with the system Cron every minute. Is this feature “Direct updates” available in the latest versions? This is the first time I’ve encountered this kind of behavior.

    Plugin Support shahzeen(woo-hc)

    (@shahzeenfarooq)

    Hi there!

    I completely understand this could be related to caching, or with a large catalog of 10,000+ products, WooCommerce’s background updates (Action Scheduler / WP-Cron) can take a moment to process.

    Just to clarify, this feature is not new; it has been available in recent versions of WooCommerce.

    Since your issue has been resolved after enabling the Direct updates option, please keep an eye on it and let us know if you notice the same behavior again.

    Thank you for your cooperation and understanding.

    Before you go, If you found our WooCommerce guidance helpful in setting up your store, we’d really appreciate it if you could leave us a 5-star review: https://ww.wp.xz.cn/support/plugin/woocommerce/reviews/#new-post. Your feedback helps us continue supporting users like you!

    Thread Starter millerml

    (@millerml)

    I noticed this problem by accident. It was resolved before I enabled – Direct updates. I’ll watch with Direct updates enabled.

    Thank you for your help

    Plugin Support shahzeen(woo-hc)

    (@shahzeenfarooq)

    Hi there!

    Thank you for the update!

    I’m glad to hear the issue has been resolved for now. Keeping Direct updates enabled should help prevent delays with stock updates, especially for low-stock or single-quantity products.

    Please keep an eye on it and let us know if the issue occurs again.

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

You must be logged in to reply to this topic.