jasonknight/woocommerce-json-api

Server-side exception during set_categories

Closed this issue · 1 comments

Request:

{
  "action": "woocommerce_json_api",
  "proc": "set_categories",
  "arguments": {
    "token": "1234"
  },
  "payload": [
    {
      "id": {},
      "name": "catnme",
      "slug": "catslug",
      "group_id": "",
      "description": "desc",
      "parent_id": "",
      "count": "",
      "taxonomy": "",
      "taxonomy_id": ""
    }
  ]
}

Apache's error log shows:

 PHP Fatal error:  Call to a member function fromApiArray() on a non-object in /home/michael/Public/projects/woo/woocommerce-json-api/classes/API_VERSIONS/version1.php on line 847, referer: http://localhost/wp-content/plugins/woocommerce-json-api/tests/interface/

Okay, error handling was added into this code to check to see if the category is valid.