I want to change or reset the total_sales to 0 at worst.
When I modify in phpMyAdmin (wc_product_meta_lookup
) nothing happens and everything goes back to the way it was before after a new order.
I searched for 2 hours without finding anything.
thank you in advance.
2
Answers
Reports (including total sales value in the dashboard widget) are dynamically generated, so I believe the value your setting in the database will just be set back to it’s true value when WordPress runs.
According to the docs, you need to delete all prior orders (permanently) and clear your browser cache for new reports.
More info: https://docs.woocommerce.com/document/reports/#section-12
total_sales
is a post meta field, a row inpostmeta
table.wc_product_meta_lookup
just contains consolidated data frompostmeta
to avoid making multiplepostmeta
selects when product data are needed.postmeta
is the source of truth in this case, you need to set your desired value in there. Either directly in the database or using a custom field in the product edit view.