• Resolved markisu72

    (@markisu72)


    Hi,
    I just found out that the date_updated_gmt in table woo_wc_orders also gets updated, when only opening an order for reading – without any further action.

    Imho, this is a severe bug.
    We’re using the REST API to fetch orders which have been updated by getting all orders descending on modification date. All our post-processing is now broken, because we’re not only getting all modified orders, but also every order which has NOT been modified but had been viewed.

    Could you please have a look into it?
    And/or advise how to handle this situation?
    It is really critical if we cannot rely on modification date from a business perspective with the Christmas buying frenzy ahead.

    Thanks
    Markus

    • This topic was modified 1 year, 3 months ago by markisu72.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter markisu72

    (@markisu72)

    Hi again,
    I tested a bit further.
    This is related to HPOS.
    When calling:

    /wp-json/wc/v3/orders?per_page=20&page=1&orderby=modified&order=desc

    the result is different depending on whether you have HPOS enabled or not.

    When HPOS is _enabled_, the last order you opened for _viewing_ is always the first order returned.

    When HPOS is _disabled_, the first order is always the one which has been _updated_ most recently, etc..

    When using HPOS, viewing an order _must not_ result in an updated modified date.

    Hope, this will get fixed, soon.

    Thx
    Markus

    PS: we now switched back to the old storage system to mitigate the effect for the time being.

    • This reply was modified 1 year, 3 months ago by markisu72.
    • This reply was modified 1 year, 3 months ago by markisu72.
    Thread Starter markisu72

    (@markisu72)

    Saif

    (@babylon1999)

    Hello @markisu72,

    Thank you for creating the report! :?)

    The developers will review your findings as soon as they have the opportunity, although we don’t have an estimate for when that will be.

    As the author, you should receive email notifications for any new replies.

    We’ll also keep this thread open in case the issue turns out to be not reproducible.

    Thanks again! :?)

    Thread Starter markisu72

    (@markisu72)

    Hi @babylon1999,

    thanks for your feedback.
    As long as Woo does not disable the option to stick with the old implementation instead of HPOS, I have a workaround. Otherwise, I would be in deep trouble ??

    Best
    Markus

    Plugin Support Shameem R. a11n

    (@shameemreza)

    Hello @markisu72,

    Our development team received the bug report you created on GitHub and will investigate the issue. At the time being, we can’t give you an estimate for when the team will look into or fix the issue, as bug reports are prioritized based on a few criteria. We appreciate your patience as we work towards a resolution.

    In the meantime, reverting to the old storage system, as you have done, is an excellent temporary solution.

    I’ll also mark the thread as solved for now, but feel free to open a new one if you have any other questions.

    Thanks!

    Hi @markisu72 not sure it will help but we are in similar situation (HPOS, back office using REST API). So far no serious issue to report (the logic of our back office integration is different) but it had me lookig into our code and WooCommerce REST API doc. I noticed from the API doc ‘orderby=modified’ is not documented in https://woocommerce.github.io/woocommerce-rest-api-docs/#list-all-orders , while ‘modified_after’ is. Not sure either work (based on your post, it is plausible that both would fail), but assuming the doc is used to reflect integration tests it may be better to stay within documented behaviour.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘HPOS: Bug with order date_updated_gmt!’ is closed to new replies.