jasonknight / woocommerce-json-api

A simple, Abstract JSON API for Wordpress' Awesome Plugin: WooCommerce
58 stars 21 forks source link

method set_orders not doing anything #41

Closed michaelfranzl closed 11 years ago

michaelfranzl commented 11 years ago

No matter which fields I set, set_orders does not return a payload.

I send:

{
  "action": "woocommerce_json_api",
  "proc": "set_orders",
  "arguments": {
    "token": "1234"
  },
  "payload": [
    {
      "name": "name",
      "guid": "guid",
      "order_key": "key",
      "billing_first_name": "firstname",
      "billing_last_name": "lastname",
      "billing_company": "company",
      "billing_address_1": "address1",
      "billing_address_2": "address2",
      "billing_city": "bcity",
      "billing_postcode": "bpc",
      "billing_country": "bc",
      "billing_state": "bs",
      "billing_email": "be",
      "billing_phone": "bp",
      "shipping_first_name": "sfn",
      "shipping_last_name": "sln",
      "shipping_company": "sc",
      "shipping_address_1": "sa1",
      "shipping_address_2": "sa2",
      "shipping_city": "sc",
      "shipping_postcode": "sp",
      "shipping_country": "sc",
      "shipping_state": "ss",
      "shipping_method": "sm",
      "shipping_method_title": "sm",
      "payment_method": "pm",
      "payment_method_title": "pmt",
      "order_discount": "1",
      "cart_discount": "1",
      "order_tax": "1",
      "order_shipping": "1",
      "order_shipping_tax": "1",
      "order_total": "1",
      "customer_user": "1",
      "completed_date": {},
      "status": "completed"
    }
  ]
}

I always get:

{
  "action": "woocommerce_json_api",
  "proc": "set_orders",
  "arguments": {
    "token": "1234"
  },
  "payload": [],
  "status": true,
  "errors": [],
  "warnings": [],
  "notifications": [],
  "payload_length": 0
}
jasonknight commented 11 years ago

Creating orders is a very complicated thing, especially for WooCom, it's not entirely supported just yet...