Hi @mbladecki,
The date_completed field in the API may be null if the order has been created but not yet completed. It’s not common, but occasionally this can happen if there’s an interruption in the order process, such as a lost internet connection or a server issue.
As for the missing date_completed in the postmeta table, it’s possible that the metadata for those orders was not properly saved due to similar interruptions or conflicts with other plugins.
Given the small number of affected orders relative to your total, these seem like isolated incidents. However, if you’re noticing a pattern or if it’s causing significant issues, it might be worth investigating further.
Please ensure all your plugins and themes are up to date, and try disabling plugins except WooCommerce one by one to see if there’s a conflict causing this issue.
If the problem persists, please reach back out to us. Looking forward to hearing from you soon.
The Order status of all the orders missing date_completed are flagged as completed and the meta key is missing. All plugins are up to date. The issues is across different versions, different plugins and different hosts. It becomes an issue when you are downloading financial data into an accounting system and the data does not match the reports. The question from the accountant becomes “If that data is incorrect, What else is incorrect? Which one is correct? The reports or API?”
I agree it is a small issue with only a few orders affected. It is difficult to track down what happened, but it leads to many hours wasted trying to figure it out.
Hi there @mbladecki 👋
One site I have 11 out of 24,000 orders that are completed with no date_completed and another I have 5 out of over 100k orders
[…]
I agree it is a small issue with only a few orders affected. It is difficult to track down what happened
Order statuses can be altered by payment gateways, and plugins with functionality to alter or appoint custom order statuses — apart from manually edited.
Therefore, I am curious if these possibilities have already been explored, or otherwise. As in, the few orders have a payment gateway plugin in common? Or, is there a plugin status update workflow in place, other than the default that comes with WooCommerce, perhaps?
I hope that helps!