Creating a Callback URL for Wordpress Woocommerce to update Order Status
I want to create a Callback URL to update the order status when data in JSON format is POST to it.
Post Format Example:
"hash": "43745580XXXXXXXXXXXXXXXXXXXXXX",
"status_feed": [{
"order_id": "123456",
"awbno": "1348616939310",
"pickupdate": "2017-11-27 19:00:00",
"current_status_desc": "Out for Delivery",
"current_status": "OOD",
"from": "GURGAON",
"to": "BAHARAICH",
"status_time": "2017-12-09 13:41:00",
"scans": [{
"time": "2017-12-09 13:41:00",
"status": "Out for delivery",
"location": "Bahraich_Kotwali_D (Uttar Pradesh)"
}, {
"time": "2017-12-08 20:44:00",
"status": "Asked for delay delivery on 2017-12-09",
"location": "Bahraich_Kotwali_D (Uttar Pradesh)"
}, {
"time": "2017-12-08 13:51:00",
"status": "Out for delivery",
"location": "Bahraich_Kotwali_D (Uttar Pradesh)"
}, {
"time": "2017-12-04 22:04:00",
"status": "Reattempt - As per NDR instructions",
"location": "Bahraich_Kotwali_D (Uttar Pradesh)"
}, {
"time": "2017-12-02 11:06:00",
"status": "Asked for delay delivery on 2017-12-03",
"location": "Bahraich_Kotwali_D (Uttar Pradesh)"
}, {
"time": "2017-12-02 10:58:00",
"status": "Out for delivery",
"location": "Bahraich_Kotwali_D (Uttar Pradesh)"
}]
}
]
Kindly help me with this issue, i am unable to find the right path to do this. I simply need a URL e.g. http://yoursite.com/some-callback-url on which the data in JSON format is posted and order status is updated accordingly.
Topic woocommerce-offtopic callbacks php plugin-development plugins Wordpress
Category Web