WooCommerce.NET
WooCommerce.NET copied to clipboard
Update order Error
Make sure you have included the below details when open an issue. Thank you.
- Wordpress version: 5.4.2, WooCommerce version: 4.3.1 and WooCommerce.NET version: 0.8.2
I use the this code:
RestAPI apiConnect = new RestAPI(UrlWS, User, PassUser);
WCObject objetoPedido = new WCObject(apiConnect);
int id = Convert.ToInt32(idPedido);
Order pedido = await objetoPedido.Order.Get(id);
pedido.status = "processing";
Order resultado = await objetoPedido.Order.Update(id, pedido);
the error: {"code":"rest_invalid_param","message":"Par\u00e1metro(s) no v\u00e1lido(s): fee_lines","data":{"status":400,"params":{"fee_lines":"fee_lines[0][total_tax] no es del tipo string."}}}
The difference is that I am using the plugin WooCommerce Pay for Payment to apply an extra charge depending on the type of payment used. Can you help me, thanks
If you only want to change the order status, please use UpdateWithNull function.
If you only want to change the order status, please use UpdateWithNull function.
I'd like to do it, but the status isn't being changed at all
If you only want to change the order status, please use UpdateWithNull function.
I tried this but i get "object reference not set to an instance of an object"
Any ideas?
Update: this worked for me https://github.com/XiaoFaye/WooCommerce.NET/issues/42#issuecomment-256442899
I want to say that for me the solution has been the solution of Mnieblab
string result = await wc.UpdateOrder (oid, new Order { status= "cancelled" })
Actually i used V3 and 0.82 version of woocomerce.net
Thanks a lot to all.