• Resolved gutdigital

    (@gutdigital)


    We have had a problems with orders. Their order IDs seem to be missing.

    On the order’s page, there is no product image and no link back to the product page. Affected orders cannot be sync’ed with our accounting system (we use an external service to accomplish this) because product IDs in the orders don’t match with product IDs in accounting.

    While investigating this issue, we analyzed the database contents about affected orders. In DB table prefix_woocommerce_order_itemmeta, affected order items have a _product_id value of 0 instead of the product’s actual ID. It seems like WooCommerce does not save the product IDs to the database for some reason, only the order_item_name in table prefix_woocommerce_order_items.

    We discovered a “quick” way of fixing affected order items: We just change _product_id in prefix_woocommerce_order_itemmeta to the actual product ID – as soon as it is corrected, WooCommerce order page shows product image and link to product page, and our external sync service is able to sync the order items.

    We looked at all the usual data to find relevant information about this issue:
    PHP logs, WC status page, WC logs, Site Health plugin, WP debug logs. There is nothing which matches the orders affected.

    We cannot reproduce the issue, though. Most of the orders come through just fine.

    Does anyone have had this or something similar happening?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Stuart Duff – a11n

    (@stuartduff)

    Automattic Happiness Engineer

    Hi @gutdigital,

    On the order’s page, there is no product image and no link back to the product page.

    I ran some cross-testing for us today on several of my installs and I’ve also as yet been unable to replicate what you describe as occurring with certain orders on your site.

    As you’ll appreciate sporadic behaviour which cannot be consistently replicated can be somewhat tricky to diagnose when most orders do not display anything similar.

    I’ve also personally not seen any other reports of similar behaviour here on our forums or from customers who have access to our support channels over at WooCommerce.com.

    Do you notice any sort of patterns in the orders which have displayed this behaviour, do they have the same products purchased, country, gateway etc?

    Thread Starter gutdigital

    (@gutdigital)

    Hi @stuartduff

    Thank you for your reply. We haven’t been able to find any pattern. Orders do contain different products, use different payment gateways, etc. The only think that is in common is the country – but we only operate in one country. Seems like we cannot do more than monitor the issue and fix broken orders manually in the meantime.

    Thanks you

    Plugin Support Stuart Duff – a11n

    (@stuartduff)

    Automattic Happiness Engineer

    Hey @gutdigital,

    Thanks for the additional information and this is rather a tricky one without seeing any patterns or being able to replicate the behaviour consistently.

    I’d continue monitoring this for the time being to see if you can find a way to replicate it as that would really help. I’m going to mark this as resolved for the time bring – if you have any further questions or can replicate this in the future, you can reopen it again if need be.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Broken orders: Product IDs missing from order items’ is closed to new replies.