Hello @henrikgda,
I’m sorry that you’re still experiencing this problem.
What has changed in order count in Analytics verses Reports?
Because main question is: why does reports show correct order count, and Analytics doesn’t?
I’m sorry you’re still experiencing an issue here. It does appear there is an error that doesn’t occur on any of our test sites, possibly due to how the orders were imported.
One thing to check is whether your reports table has order rows which don’t match any actual order numbers in your database. Could you try a query similar to this to see if that is the case? If so, deleting these extra rows may resolve the error:
SELECT * from wp_wc_order_stats where `order_id` not in (select `ID` from wp_posts where `post_type` = 'shop_order');
I recommend any changes you make are either on a test site or during a maintenance period with after a full backup.
If that doesn’t reveal an issue, could you answer some questions?
- When you checked your analytics view without your theme or any other plugins active, did you clear the transients and analytics cache, then re-import your data as under those conditions?
- If you have a staging site, can you replicate the issue by importing products using the same tool? If so, can you try a different import tool to see if the issue recurs?
Thanks for considering my suggestions, and I hope we can get to the bottom of this. We look forward to hearing back from you!
-
This reply was modified 3 years, 4 months ago by
lionel.a11n. Reason: Repair SQL code formatting