kloon/WooCommerce-REST-API-Client-Library

The order address is not saved.

JavohirYakubov opened this issue · 0 comments

I save the order, but the order addresses (Other Information) are not saved. Please help!
My php code:
/////////////////////////////////////////////////////////////
$orderData = array(
"order" => array(
"billing_address" => array(
array(
"first_name" => "test",
"last_name" => "test",
"company" => "test",
"address_1" => "test",
"address_2" => "test",
"city" => "test",
"state" => "test",
"postcode" => "",
"country" => "",
"email" => "",
"phone" => "+998"
)
),
"shipping_address" => array(
array(
"first_name" => "+998901648595",
"last_name" => "test",
"company" => "",
"address_1" => "test",
"address_2" => "test",
"city" => "",
"state" => "",
"postcode" => "",
"country" => ""
)
),
//"customer_id" => 1,
"line_items" => $order['order']
)
);
$res_order=array();
$res_order=$client->orders->create($orderData);
/////////////////////////////////////////