woocommerce / woocommerce/wc-api-php
Impossible to add meta_data to line_items
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 546
- Forks
- 158
- Avg merge
- 3h 21m
- Merged PRs (30d)
- 2
Description
I am trying to add additional attributes to the line_items before a purchase.
But after the request is done I don't have the information sent in the meta_data attribute
I use woocommerce rest api
//EXAMPLE OF INPUT
{
...ordersAttributes,
line_items: [{
product_id: 12,
meta_data: [
{
key: 'Size',
value: 121
}
]
}]
}
//EXAMPLE OF OUTPUT
{
...ordersAttributes,
line_items: [{
product_id: 12,
meta_data: []
}]
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the order request with line_items.meta_data and compare the returned line_items data. The issue names no source file or test, so trace the REST API path that handles line-item metadata and verify that the submitted key and value are preserved in the response.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100