php - Woocommerce Order Update "woocommerce_api_invalid_customer_id" but I'm not trying to update Customer -


seems simple. trying update order via v2 api in woocommerce.

here request being issued :

put /wc-api/v2/orders/8054?oauth_consumer_key=ck_notgoingtogiveittoyouinexample&oauth_nonce=same&oauth_signature_method=hmac-sha256&oauth_timestamp=1436817942&oauth_signature=same http/1.1 

here json in request body :

{"order": {"status": "completed"}} 

here result getting :

{"errors":[{"code":"woocommerce_api_invalid_customer_id","message":"customer id invalid"}]} 

the weird thing is, not asking update customer id, or besides status.

also, when happens, woocommerce update status, doesn't set correctly.

i getting status note on order of :

{ order status changed {.

do have serialize entire order object server? if not, ideas doing wrong?

thanks!

[update #1]

so, after tracing through api code, , adding debug logging, noticed $data not being set @ coming update function route. since following of appropriate requirements "json in request body, json content type in header", not sure going on. able resolve using api code template create own order update function. calling own flagordercompleted , it's working fine because not having pass parameters. it's hacky , isn't catch solution @ least it's working!

customer id required in json body in order update order. please refer resolved issue. , this link referring syntax of body customer id.

hope solves issue.


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -