Replies: 1
Good afternoon everyone, I am trying to create an order from one woocommerce to another but I can not set the price in any way, I pass the code to you in case you can help me say that I am doing wrong or if on the contrary it is not possible to what I am creating to put the total that I want
$data = [
'customer_id' => 35,
'payment_method' => 'paypal',
'payment_method_title' => 'Paypal',
'set_paid' => true,
'total' => 500,
'billing' => [
'first_name' => 'Luis Alberto',
'last_name' => 'Agea Duran',
'address_1' => '969 Market',
'address_2' => '',
'city' => 'Los Palacios',
'state' => 'SE',
'postcode' => '41720',
'country' => 'ES',
'email' => 'lagea@cmdgroup.es',
'phone' => '617701977'
],
'shipping' => [
'first_name' => 'Luis Alberto',
'last_name' => 'Agea Duran',
'address_1' => '969 Market',
'address_2' => '',
'city' => 'Los Palacios',
'state' => 'SE',
'postcode' => '41720',
'country' => 'ES'
],
'line_items' => [
[
'product_id' => 295400,
'quantity' => 1,
]
]
];
$res = $woocommerce->post('orders', $data);