I think it's more useful to return the used , probably new, line item object instead the order in commerce_cart_product_add().
This since it's easier to load the appropriate order object afterwards than iterating over all line item objects to find the newly added one.
I quickly searched in the code and it looks like the return of the function is not used anywhere yet. Thus the change shouldn't have a big impact.

Comments

rszrama’s picture

Issue tags: +beta blocker

Tagging.

rszrama’s picture

Status: Needs review » Fixed

Committed w/ an update to the only test using this API function.

https://github.com/rszrama/drupalcommerce/commit/413928e934758e669e97713...

Status: Fixed » Closed (fixed)
Issue tags: -beta blocker

Automatically closed -- issue fixed for 2 weeks with no activity.