It can be annoying putting stuff in rules, that aren't supposed to be accessible trough ui after all.
In commerce, most rule triggers are combined with a hook. However, in commerce_coupon, some does not.

Proposing adding two new hooks,
- hook_commerce_coupon_redeem
- hook_commerce_coupon_validate

This gives custom code full control over the workflow.

#1 1929292-0-new-hooks.patch1.68 KBfarald


farald’s picture

Status:Active» Needs review
new1.68 KB

Something like this.

pcambra’s picture

Watch out the extra spaces in your patch.

Why not use rules_invoke_all instead?

pcambra’s picture

Status:Needs review» Needs work

I'd say that this patch comes with more stuff than the proposed in the description

pcambra’s picture

Issue summary:View changes