ñull
ñull

Reputation: 553

Delete WooCommerce Analytics data

I try to anonymize WooCommerce for debug access by third party plugin developers with a bash command line script on my linux server. I successfully could remove users and orders but now I discover that all the sales statistics are still available in WooCommerce' Analytics including names and figures. Where do I find this in database so I can include it my database query to address it?

By request I include here a screenshot of WC analytics' first page with sales and order reports, financial data not to be revealed to a plugin author. enter image description here

Upvotes: 0

Views: 2392

Answers (3)

MacDante
MacDante

Reputation: 11

I got this same problem and resolve it via SQL.

Try use this SQL to remove orders stored in WooCommerce analytics:

DELETE FROM [TABLE_PREFIX]_wc_order_stats;
DELETE FROM [TABLE_PREFIX]_wc_order_coupon_lookup;
DELETE FROM [TABLE_PREFIX]_wc_order_product_lookup;

Upvotes: 1

Unicco
Unicco

Reputation: 2578

Truncate wp_wc_order_stats table and go to Tools and press "Clear analytics cache". That worked for me.

Upvotes: 0

Ivo Jerkovic
Ivo Jerkovic

Reputation: 683

Try to run WooCommerce > Status > Tools > Clear Analytics Cache tool. Analytics dashboard is using a lot of caching, otherwise it would be too slow. Before clearing the cache, make sure you empty the orders from the trash too.

And while you are on the WooCommerce > Status > Tools page, delete all transients too.

Upvotes: 5

Related Questions