Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#1 | 1929292-0-new-hooks.patch | 1.68 KB | farald |
Comments
Comment #1
farald CreditAttribution: farald commentedSomething like this.
Comment #2
pcambraWatch out the extra spaces in your patch.
Why not use rules_invoke_all instead?
Comment #3
pcambraI'd say that this patch comes with more stuff than the proposed in the description
Comment #3.0
pcambrarephraze