Closed (won't fix)
Project:
Commerce Card on File
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
10 Oct 2012 at 01:37 UTC
Updated:
18 Apr 2013 at 15:10 UTC
Jump to comment: Most recent file
Comments
Comment #1
recrit commentedThe attached patch ...
In testing the new hooks, I ran into #1539344: Error in commerce_cardonfile_data_delete so this patch includes a fix for the delete query.
Comment #2
jpstrikesback commentedThis is pretty cool but I believe the delete invocations should be placed before the db_delete i.e. before the db is changed, so that other modules can act before it is gone (even tho you pass the original $card_data). This seems to be the pattern in core (see hook_node_delete)
Comment #3
recrit commentednice catch... re-rolled patch
Comment #4
berdirThis makes sense, although I'm wondering if we shouldn't just make it a real entity, then we'd get the standard entity CRUD hooks for free. There is an issue for that at #1777352: Expose Card Data as a Drupal Entities.
* Hook documentation from this issue would still be useful, maybe it could be merged into the other one.
Comment #5
recrit commentedI agree with the entity route, however, it's an architectural change and would cause issues with contrib modules using card on file. Entity based could be the 2.x branch.
Comment #6
dwkitchen commentedThis has been done in 2.x by moving to entities.