3

Is it possible to retrieve a user's order history programatically?

Ideally, I would be able to user the user's profile ID to then load multiple past orders.

1 Answer 1

6

Yes you can use the commerce_order_load_multiple() function and take advantage of the $conditions parameter, e.g.

$orders = commerce_order_load_multiple(array(), array('uid' => $user_id));
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.