Replies: 3
I tried using this API: wcapi.get("reports/sales?period=month").json()
. It worked fine before the upgrade, but after upgrading to version 9.2.3, the values returned are all 0.
Result:
[{‘total_sales’: ‘0.00’, ‘net_sales’: ‘0.00’, ‘average_sales’: ‘0.00’, ‘total_orders’: 0, ‘total_items’: 0, ‘total_tax’: ‘0.00’, ‘total_shipping’: ‘0.00’, ‘total_refunds’: 0, ‘total_discount’: ‘0.00’, ‘totals_grouped_by’: ‘day’, ‘totals’: {‘2024-09-01’: {‘sales’: ‘0.00’, ‘orders’: 0, ‘items’: 0, ‘tax’: ‘0.00’, ‘shipping’: ‘0.00’, ‘discount’: ‘0.00’, ‘customers’: 2}, ‘2024-09-02’: {‘sales’: ‘0.00’, ‘orders’: 0, ‘items’: 0, ‘tax’: ‘0.00’, ‘shipping’: ‘0.00’, ‘discount’: ‘0.00’, ‘customers’: 6}, ‘2024-09-03’: {‘sales’: ‘0.00’, ‘orders’: 0, ‘items’: 0, ‘tax’: ‘0.00’, ‘shipping’: ‘0.00’, ‘discount’: ‘0.00’, ‘customers’: 0}}, ‘total_customers’: 8, ‘_links’: {‘about’: [{‘href’: ‘https://$mydomain/wp-json/wc/v3/reports’}]}}]