Problem/Motivation
The current implementation to evaluate inline conditions doesn't forward the order entity to the subsequently called rules components.
However, for some scenarios it is desirable to actually know in what context things are evaluated.
Proposed resolution
As raised here #2529254-6: Multiple inline conditions does not obey OR operator the current inline condition evaluation doesn't seem to properly build upon the inline conditions API.
To avoid opening a can of worms by adjusting the whole implementation I'd suggest to simply add the new parameters to the existing implementation.
Remaining tasks
Reviews needed.
I'm not quite sure yet how the changes interact with existing setups that might have an adjusted rules component.
User interface changes
None.
API changes
New parameter in several functions - usually appended but required, so not completely backward save.
Data model changes
None.
Release notes snippet
Inline Condition Evaluation now receives the order entity as context. If you have customized the Coupons Inline Condition handling ( e.g by using the hook_commerce_coupon_condition_component_alter() you need to ensure your modifications are still compatible.
Same applies if you use the rules Condition "Coupon inline conditions pass" manually somewhere in your rules configuration.
| Comment | File | Size | Author |
|---|---|---|---|
| commerce_coupon-pass-in-order-to-inline-condition-evaluation.patch | 3.51 KB | das-peter |
Comments