Plugin version: 5.6.30
Dynamic Rule Escalates to Entire Cart When Target Product Becomes Private
Steps to Reproduce
- Create a dynamic rule that sets a fixed price for a specific product.
- Change the targeted product's status to Private (this may also occur with Draft or other non-public statuses).
- Edit the dynamic rule (for example, change its title) and save it.
- Observe the result.
Actual Result
The dynamic rule is no longer restricted to the originally selected product and instead is applied to all products in the cart.
Expected Result
If the product targeted by the dynamic rule is no longer available because it has been set to Private (or another non-public status), the rule should not be applied to any products. The rule should remain inactive until the originally selected product is published again. Under no circumstances should the rule escalate and apply to the entire cart without the user explicitly modifying the rule's product selection or scope.
Notes
- The issue appears to occur when the rule is re-saved after the target product becomes private. Even though the user has not made any conscious changes to the rule's product selection or application scope, the rule is escalated to apply to the entire cart.
- This behavior effectively causes a silent scope expansion, where a routine action such as renaming and saving a rule expands its scope from a single product to the entire cart without explicit user intent or awareness.
- It may also affect products with statuses other than Private, such as Draft.