I wanted to use the getOrder() method from the CommerceReturn class, but it always return FALSE instead the expected order.

CommentFileSizeAuthor
#1 2247199-commerce_return-getOrder.patch722 bytestheo_
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

theo_’s picture

Status: Active » Needs review
FileSize
722 bytes

Here is a patch which fix the issue by using array_key_exists() instead of in_array() because commerce_order_reference is part of the property info array keys and not the array values.

jkuma’s picture

Status: Needs review » Reviewed & tested by the community

Thank you theo_ for catching this bug! Please feel free to commit it at any moment when you'll get the chance to do it.

theo_’s picture

Status: Reviewed & tested by the community » Fixed

Thanks you O-sensei goldorak !

Committed to branch 7.x-2.x (commit)

Status: Fixed » Closed (fixed)

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