1
Answers
Vote up!
0
Vote down!

How to use hook_commerce_entity_access_condition_ENTITY_TYPE

It appears the entity access system has changed of recent, and I see in commerce_entity_access_query_alter() that there is now a hook_commerce_entity_access_condition_ENTITY_TYPE hook available... could you provide a simple example of this at work? I want to just compare a field on any of the order's line items with a field that the user has to grant access to orders (and thus line items). I'll be playing around with it myself, but if folks are already on this it would be great to see if someones already putting this into action! Maybe even roll a patch for commerce.api.php to document this super handy hook... :)

Asked by: rerooting
on November 2, 2013

1 Answer

Vote up!
0
Vote down!

Oy vey, I for some reason had trouble finding commerce_cart_commerce_entity_access_condition_commerce_order_alter(). I was digging in the wrong places somehow. Consider this one closed, thanks!

Answer by: rerooting
Posted: Nov 3, 2013