Closed (fixed)
Project:
Commerce Core
Version:
7.x-1.x-dev
Component:
Line item
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
9 Nov 2010 at 13:45 UTC
Updated:
23 Nov 2010 at 15:40 UTC
In some cases it's useful to know if a line item presave handles an insertion or an update since some modifications have only to happen on one of these occasions.
Attached patches provide an ability to do so. I prefer the solution with the $op parameter since there's less overhead (technical and documentation), while provide same functionality.
| Comment | File | Size | Author |
|---|---|---|---|
| commerce-line-item-insert-update-presave-hooks.patch | 1.38 KB | das-peter | |
| commerce-line-item-hook-presave-with-op-param.patch | 1.72 KB | das-peter |
Comments
Comment #1
rszrama commentedCommitted a slightly altered version of the two separate hooks patch:
https://github.com/rszrama/drupalcommerce/commit/1cc1d06a83cc6548cf021a9...