Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- { "rules_setting_old_profiles_to_be_inactive" : {
- "LABEL" : "Setting old profiles to be inactive",
- "PLUGIN" : "rule",
- "REQUIRES" : [ "rules" ],
- "USES VARIABLES" : {
- "created_profile" : { "label" : "created_profile", "type" : "commerce_customer_profile" },
- "old_profile" : { "label" : "old_profile", "type" : "commerce_customer_profile" }
- },
- "IF" : [
- { "NOT data_is" : {
- "data" : [ "created-profile:profile-id" ],
- "value" : [ "old-profile:profile-id" ]
- }
- },
- { "data_is" : { "data" : [ "old-profile:status" ], "value" : 1 } }
- ],
- "DO" : [
- { "data_set" : { "data" : [ "old-profile:status" ], "value" : 0 } },
- { "entity_save" : { "data" : [ "old-profile" ], "immediate" : 1 } }
- ],
- "PROVIDES VARIABLES" : [ "created_profile", "old_profile" ]
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement