• Resolved CodeMonkeyBanana

    (@codemonkeybanana)


    In the analytics section there is a button to download report. If the data set is small the download works fine. If there is a lot of data then it pops up a toaster message saying the report will be emailed but the report is never emailed.

    To investigate what was going on I recreated the API request with cookies and nonce. This is payload I sent:

    {
        "report_args": {
            "interval": "day",
            "orderby": "date",
            "order": "desc",
            "page": 1,
            "per_page": 25,
            "after": "2020-01-01T00:00:00",
            "before": "2020-04-02T23:59:59"
        },
        "email": true
    }

    I received this response:

    {
        "status": "success",
        "message": "Your report file is being generated.",
        "_links": {
            "status": [
                {
                    "href": "https://localhost/wp-json/wc-analytics/reports/revenue/export/15858535098953/status"
                }
            ]
        }
    }

    So then I queried the status link to see how progress was going and it always returns this:

    {
        "percent_complete": 0,
        "_links": {
            "self": [
                {
                    "href": "https://localhost/wp-json/wc-analytics/reports/revenue/export/15858535098953/status"
                }
            ]
        }
    }

    So the report never generates and the email never gets sent. Also in the logs there are no errors or warnings.

    Why is report not generating?

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Reports not generating/emailing’ is closed to new replies.