REST API or WC_Order::update_status() action to update order status with given conditions

Completed Posted 6 years ago Paid on delivery
Completed Paid on delivery

My store is built on WooCommerce with WP-Lister for eBay Pro ([url removed, login to view]) and WP-Lister for Amazon Pro ([url removed, login to view]) plugins. At the time of completing the orders they have no shipping information – it is bulk imported to WooCommerce later, therefore I need both plugins resubmit order details to eBay and Amazon.

The task is to write a function/action which will use REST API or WC_Order::update_status() to re-update orders’ status to Completed. Conditions:

- Only orders made on eBay or Amazon with provided tracking number will be updated (either tracking_number or wpla_tracking_number custom fields for the order have value)

- update orders for which status change from Processing/On hold/Pending payment to Completed occurred today().

Action will be executed from server’s Cron one time daily and I would like also to have a possibility of manual execution for given date, i.e. by entering:

https://mywebsite/wp-admin/[url removed, login to view]?2018-03-03

action will be executed for all orders completed on 2018-03-03 for which one of the fields: tracking_number or wpla_tracking_number is not empty.

PHP WooCommerce

Project ID: #16414798

About the project

4 proposals Remote project Active 6 years ago

Awarded to:

flyoverwebdev

Hello, I would like to build your function for handling order status. Let's discuss more details. Thank you!

£55 GBP in 1 day
(57 Reviews)
6.0