Remove $op from hook_ec_transactionapi()

recidive - July 1, 2009 - 08:41
Project:e-Commerce
Version:6.x-4.x-dev
Component:ec_store
Category:task
Priority:normal
Assigned:recidive
Status:closed
Description

Should we remove $op from hook_ec_transactionapi() and have individual hooks for operations, e.g. hook_ec_transaction_load(), hook_ec_transaction_insert(), hook_ec_transaction_update(), etc?

Too late for 6.4?

I'd be happy to work on that one.

#1

gordon - July 1, 2009 - 12:45

Yes please do, also you may want to look though some of the other projects and submit patches as well just to be nice.

Anyway if people should avoid using the transactionapi unless you really need to. I have found that most of the time they are looking for either the workflow or the allocation flags to change which is handled by the hook_ec_txn_workflow() and hook_ec_txn_allocation() (I think those are correct) which are fired when ever one of the flags is changed.

Gordon.

#2

recidive - July 2, 2009 - 09:12
Assigned to:Anonymous» recidive
Status:active» needs work

Ok, committed a patch that get rid of $op:

http://drupal.org/cvs?commit=232608

Moving the issue to CNW until I submit patches to contrib projects.

I will file an issue for documenting the new hooks as well.

#3

recidive - July 4, 2009 - 17:43
Status:needs work» fixed

Ok, I filed those issues to contrib modules for porting to new hooks implementations:

Development will continue there. So marking this one as fixed.

#4

System Message - July 18, 2009 - 17:50
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.