Closed (works as designed)
Project:
Commerce Core
Version:
7.x-1.2
Component:
Order
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
10 May 2012 at 15:06 UTC
Updated:
10 May 2012 at 15:52 UTC
I tried to use hook_entity_update() to make some changes to an order after the checkout process is completed and the order status is changed to pending.
Because of the order status being changed via Rules, the hook_entity_update() is not triggered and cannot make other changes I need.
Comments
Comment #1
rszrama commentedAny order status update triggers an order save, which ultimately calls our entity controller's invoke method where the entity_* hooks are invoked. If you didn't clear the cache before testing your code, the hook wouldn't have been registered. However, you should probably be using hook_commerce_checkout_complete() instead, instead of being dependent on order updates. You never know when an order update may cause an order to pass through the pending status, but the checkout completion hook should only be called once for any given order.