Comments (2)
Hi,
maybe I misunderstood, but sending a PUT request to the wp-json/wc/v2/orders/#order_id
seems to change the price of product and shipping cost for the order?
e.g.
curl -X PUT \
https://local.wordpress.test/wp-json/wc/v2/orders/#order_id \
-H 'authorization: ... \
-H 'content-type: application/json' \
-d '{
"line_items": [
{
"id": 29,
"product_id": 11,
"subtotal": "47.00",
"subtotal_tax": "0.00",
"total": "47.00",
"total_tax": "0.00",
"sku": "woo-hoodie-with-logo",
"price": 47
}
],
"tax_lines": [],
"shipping_lines": [
{
"id": 30,
"method_title": "Flat rate",
"method_id": "flat_rate",
"instance_id": "1",
"total": "12.00",
"total_tax": "0.00",
"taxes": []
}
]
}'
from wc-api-dev.
As Peter said, it's already possible to change the prices. Probably you are using a legacy version of WooCommerce REST API.
You can check the doc for the latest version in https://woocommerce.github.io/woocommerce-rest-api-docs/
from wc-api-dev.
Related Issues (20)
- Fetching customers with specific username gets all the customers HOT 1
- Products - date created is read only via the API, but updatable within admin HOT 8
- Media Endpoint [ Idea / Suggestion ] HOT 2
- Cannot retrieve products from child category HOT 4
- Filtering products using attributes does not work HOT 1
- Support for multiple order statuses when filtering a get request HOT 2
- Add a field indicating a note "type" to the order notes api HOT 2
- After/before date filtering does not fully support ISO 8601 HOT 2
- Support for hourly stats granularity HOT 3
- shipping_lines response - include `instance id` field HOT 2
- Ability to fetch a list of orders matching more than one status, bonus using a status search wildcard HOT 1
- New endpoint to get woo order statuses HOT 6
- Add total order count in the metadata of the /orders endpoint HOT 1
- When this api version is going to be released HOT 1
- Is there a target date for v4? HOT 1
- Retrieve orders by date modified in 3.6 HOT 3
- Add currencyCode and presentation details to data/continents response HOT 1
- Unit Test Failures (2): Product Variations get_parent_id() HOT 1
- How to contribute in WC API? HOT 1
- More product list orderby settings.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wc-api-dev.