skip to Main Content

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


  1. 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

    Login or Signup to reply.
  2. total_sales is a post meta field, a row in postmeta table. wc_product_meta_lookup just contains consolidated data from postmeta to avoid making multiple postmeta 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.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search