Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

How to get order from order number

$
0
0

Replies: 0

This is a great plugin, it works really well in most situations. However, I am doing a custom integration with our fulfillment house, and I need to set an order as completed when the order has been shipped, so I need to load the order based on the order number, and set the status to completed.

If I were doing it based on the order ID I would do it like this:

$order = wc_get_order( $order_id);
$order->update_status('completed', 'order_note')

But I do not get back order id from the fulfillment company, I get the order number.

How can I do this from order number? Is there a way to get order ID from order number for example?


Viewing all articles
Browse latest Browse all 59525

Trending Articles