Trying to alter a line item in hook_entity presave based on its recurring entity (because recurring doesn't copy field values of line items... a bigger issue!), but there's no way to load it. recurring_load_by_order doesn't work because the Order hasn't been saved with the recurring info yet.

A very simple change makes this information available, though. Patch attached.

Comments

gcb created an issue. See original summary.

gcb’s picture

Status: Active » Needs review
StatusFileSize
new1.28 KB
deggertsen’s picture

Status: Needs review » Needs work

Patch doesn't apply to most recent dev. Would you mind reviewing the patch against the most recent version and re-submitting if necessary?

gcb’s picture

StatusFileSize
new1012 bytes

Certainly still necessary. When calling "commerce_product_line_item_new()" we want to pass our data array in rather than adding some values to it after creation, so everything is there for hooks to see. Updated patch attached.

gcb’s picture

Status: Needs work » Needs review

  • deggertsen committed 40cafab on 7.x-2.x authored by gcb
    Issue #2884212 by gcb: Make Line Item recurring info available in...
deggertsen’s picture

Status: Needs review » Fixed

Looks good. Thanks gcb.

Status: Fixed » Closed (fixed)

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