Commerce_payment.token.inc offers some tokens that require the order object, however, in some cases does not load the order, resulting in a couple of php notices.

Comments

helior’s picture

Status: Active » Needs review
StatusFileSize
new2.18 KB

Patch loads order in the correct scope, and checks for existence for order before offering tokens replacements.

amateescu’s picture

StatusFileSize
new550 bytes

I don't think we should load the order object for all tokens because it's not really needed. I'd go with a simpler approach, like the patch attached :)

bojanz’s picture

Status: Needs review » Reviewed & tested by the community

#2 looks good.

rszrama’s picture

Status: Reviewed & tested by the community » Fixed

Yeah, I'll go with patch #2. It looks like the original bug was a copy / paste error, and #2 seems to nail it (and keeps the logic check on the proper entity's uid property).

Status: Fixed » Closed (fixed)

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