Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update of order line_items #18

Open
philipdomann opened this issue Jul 30, 2019 · 1 comment
Open

Update of order line_items #18

philipdomann opened this issue Jul 30, 2019 · 1 comment

Comments

@philipdomann
Copy link

philipdomann commented Jul 30, 2019

Hi icoderman,
can you please give me an example of how I can update line_items of an order?

params.put("line_items", p); Map response = wooCommerce.update(EndpointBaseType.ORDERS.getValue(), orderId, params);

I only get the message:
{code=rest_invalid_param, message=Ungültige(r) Parameter: line_items, data={status=400, params={line_items=line_items[0] ist nicht vom Typ object.}}}

It works with Postman, when I use raw (Json) and this structure:
{"line_items": [{...}]}

@omandryk
Copy link
Collaborator

Hi @philipdomann I guess P must be list of objects. Could you show how your initialization of variable p looks like?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants