I'm trying to update a WooCommerce order using Update an Order in the Woo API (API Doc)
I want to add the following information into an order:
- tracking provider
- tracking number
- tracking URL
I can add/update information inside of the "meta data" array, however, I can't seem to figure out how to update the "_wc_shipment_tracking_items""value" array that is located within the "meta data" array.
So essentially, I want to update/create an array within an array. For a visual understanding, see (highlighted is where I want to update):
I’ve tried many variations, but the following is as far as I've come... I can’t seem to figure it out:
"meta_data": [ {"key": "_wc_shipment_tracking_items" "value": [ {"key": "custom_tracking_provider","value": "postage service" }, {"key": "tracking_number","value": "aaa123" }, {"key": "custom_tracking_link","value": "https://google.com/" } ] }]I hope someone can help me out, or point me in the right direction. Thank you :)
