In drupal commerce rules there are selectors like 'commerce-line-item' and 'commerce-line-item-unchanged' – what is the differnece between them? When should i use the one or the other?


Commerce line items are Drupal Entities (enhanced a bit by the Entity module) and, like other entities, the "entityname-unchanged" is present in some rules just so you can see what the entity was like before it got changed.

There isn't a specific use case intended for it but there are cases where being able to see the original state of an entity would be good. Specific to a commerce line item, maybe you'd want to reset the line item's quantity to its old value if they chose some crazy number like 10000.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.