• Resolved pp412

    (@pp412)


    Hi Guys,
    With the Rest API interface we read the data from our shop.
    Unfortunately there are problems with the value of “total_sales”.
    This gives me wrong values ??for certain products.

    If I evaluate the Woocommerce reports or evaluate the “orders” via the REST API interface, I arrive the correct equal number of products sold for both.
    The value REST API “total_sale” gives me more sales for some products.

    Does anyone have any idea how I can correct this value?

    For info:
    It may have something to do with the fact that at the beginning internal test purchases were made which unfortunately were simply deleted.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @pp412,

    It may have something to do with the fact that at the beginning internal test purchases were made which unfortunately were simply deleted.

    That is likely the source of the incorrect data. The total_sales is saved as a custom field on each product. If it’s not correct, double check in the admin by editing the product and then adjust the value to correct it. Then from that point forward, it should be right.

    custom fields

    If you still have trouble after correcting those manually, let me know.

    Thanks!

    Thread Starter pp412

    (@pp412)

    Thank you for this hint.
    I found the value in the database and changed it there directly.

    For all who need it once. table: gowp_postmeta
    Enter the id of the product in the “post_id” field and then change total_sales

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘REST API “total_sale” response with wrong value’ is closed to new replies.