I'm trying to update the status of an order using Axios and the Woocommerce REST API, but I keep getting a 404 error. Here's my first attempt:
axios.put('https://staging/wp-json/wc/v3/orders/1977?consumer_key=123&consumer_secret=456',
{status: "completed"});
And here's my second try:
axios.put('https://staging/wp-json/wc/v3/orders/1977?consumer_key=123&consumer_secret=456/',
{"Content-Type": "application/json", status: "completed"});
This is what the API documentation suggests:
curl -X PUT https://example.com/wp-json/wc/v3/orders/727 \
-u consumer_key:consumer_secret \
-H "Content-Type: application/json" \
-d '{
"status": "completed"
}'
Can anyone spot where I might be going wrong? Any advice would be greatly appreciated...