• Resolved bretweinraub99

    (@bretweinraub99)


    We cloned a site, deleted orders from the WooCommerce -> Orders menu and emptied the trash.

    I’ve verified at the database level that the order are gone, they aren’t in wp_posts anymore.

    But one thing we see is our WC analytics data is off. We tried both:

    • clearing the analytics cache
    • “reimporting” historical analytics data

    We still see the deleted order’s data in the analytics. What’s the magic formula to make this data regenerate? Also what table does it live in? If I could find it I could probably diagnose it myself.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter bretweinraub99

    (@bretweinraub99)

    Well I found the data at least. It’s in wp_options of all places.

    Selecting “remove transients” from WC tools has no effect.

    | _transient_wc_report_orders_stats_d21b43eb1f5287c82e31c6880a3ba933 |
    | _transient_wc_report_orders_stats_d2d72e78dc787ad923c512590b2b661e |
    | _transient_wc_report_orders_stats_d5766759e08afce119390e0866c2376d |
    | _transient_wc_report_orders_stats_d668fd04cfea52829190ca59cdda7638 |
    | _transient_wc_report_orders_stats_d88ee57d367bb31b7374b7acc0f6f829 |
    | _transient_wc_report_orders_stats_dd08f1bb51bd3f8e85cb0ce46bf3df61 |
    | _transient_wc_report_orders_stats_df098d93907f64f82dab9017ecd37ffb |
    | _transient_wc_report_orders_stats_df75f3c2a30f6dc4ae264ae6622579ab |
    | _transient_wc_report_orders_stats_e21ca010417ea4905f83b2d0120d842d |
    | _transient_wc_report_orders_stats_e57992224325ecdb6ae387e505fb3218 |
    | _transient_wc_report_orders_stats_ec16ef93945864c25e80eb4180b96d3d |
    | _transient_wc_report_orders_stats_f4a15a3ed8afe2e5af5ba7fe19bf6f99 |
    | _transient_wc_report_orders_stats_f4fc93dfa9f711e646a3d4e5d528570b

    Thread Starter bretweinraub99

    (@bretweinraub99)

    Hah! I figured it out. There’s no referential integrity in this database so there was orphaned order and order_item data all over the place. Just had to blow it all away out of 10 different tables. Carry on.

    Saif

    (@babylon1999)

    Hello @bretweinraub99,

    Thank you for sharing the solution here with the community! ??

    I’ll be marking the thread as solved, feel free to create a new one if you have any other questions.

    Cheers!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Can’t seem to regenerate analytics data after orders were deleted’ is closed to new replies.