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...