Maybe you changed the value in the custom fields section. As far as I’m aware, total_sales is left alone.
Not mike. I did not touch that custom field at all. Just updated the product page making some content changes.
Anyway, I fixed this from the database table wp-postmeta. I manually updated the count there as I knew the actual download count. And now it’s working fine.
Thanks
You do see it in the custom fields meta box right?
Yes, when I checked the front end where I was calling total_sales, I saw the value to 0. Immediately I went inside the product and found the total_sales custom field was showing 0. I tried to update the value in the custom field but it was not updating. So, I resorted to database and updated that manually in the DB. Not sure if that’s a bug or what.
No, I mean when you edit the product. Find the meta box called ‘custom fields’. It’s there.
You can edit it there instead of touching the database.
I tried but wonder why it was not updated there.
Hi Mike, it seems the last update of WooCommerce broke the total sales variable, as the Total Sales plugin is no longer working. Are you planning on an update soon?
Nothing changed in core regarding total_sales.