Здравствуйте! Такой вопрос, как настроить подключение к woocommerce rest api с помощью "WooCommerce API - PHP Client"? Никак не получается..
Настроил с помощью "WooCommerce-REST-API-Client-Library", но JSON получаю ввиде
stdClass Object
(
[orders] => Array
(
[0] => stdClass Object
(
[id] => 91
[order_number] => 91
[created_at] => 2016-11-21T09:25:23Z
[updated_at] => 2016-11-21T09:25:23Z
[completed_at] => 2016-11-21T09:25:23Z
[status] => processing
[currency] => RUB
[total] => 720.00
[subtotal] => 720.00
[total_line_items_quantity] => 1
[total_tax] => 0.00
[total_shipping] => 0.00
[cart_tax] => 0.00
[shipping_tax] => 0.00
[total_discount] => 0.00
[shipping_methods] =>
[payment_details] => stdClass Object
(
[method_id] => cod
[method_title] => Наложенный платеж
[paid] =>
)
[billing_address] => stdClass Object
(
[first_name] => ...
[last_name] =>
[company] =>
[address_1] => ...
[address_2] =>
[city] => ...
[state] =>
[postcode] =>
[country] => RU
[email] =>
[phone] => ...
)
Я мало чего понимаю в JSON, но мне нужно получить что-то в виде:
[
{
"id": 154,
"parent_id": 0,
"status": "processing",
"order_key": "wc_order_574cc02467274",
"number": "154",
"currency": "USD",
"version": "2.6.0",
"prices_include_tax": false,
"date_created": "2016-05-30T22:35:16",
"date_modified": "2016-05-30T22:35:16",
"customer_id": 0,
"discount_total": "0.00",
"discount_tax": "0.00",
"shipping_total": "10.00",
"shipping_tax": "0.00",
"cart_tax": "1.95",
"total": "37.95",
"total_tax": "1.95",
"billing": {
"first_name": "John",
"last_name": "Doe",
"company": "",
"address_1": "969 Market",
"address_2": "",
"city": "San Francisco",
"state": "CA",
"postcode": "94103",
"country": "US",
"email": "john.doe@example.com",
"phone": "(555) 555-5555"
},
"shipping": {
"first_name": "John",
"last_name": "Doe",
"company": "",
"address_1": "969 Market",
"address_2": "",
"city": "San Francisco",
"state": "CA",
"postcode": "94103",
"country": "US"
},
Возможно этого можно достичь с помощью "WooCommerce API - PHP Client", но настроить его не получается..
P.S: это все нужно для парсинга заказов в unity, а там нужен чистый JSON. Если есть варианты как подключиться к woocommerce rest api напрямую с c#, подскажите пожалуйста.