Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- { "rules_grant_user_a_role" : {
- "LABEL" : "grant user a role",
- "PLUGIN" : "reaction rule",
- "REQUIRES" : [ "commerce_order", "rules", "commerce_checkout" ],
- "ON" : [ "commerce_checkout_complete" ],
- "IF" : [
- { "commerce_order_contains_product" : {
- "commerce_order" : [ "commerce_order" ],
- "product_id" : "IPH1-BLK-OS",
- "operator" : "=",
- "value" : "1"
- }
- }
- ],
- "DO" : [
- { "user_add_role" : {
- "account" : [ "site:current-user" ],
- "roles" : { "value" : { "3" : "3" } }
- }
- }
- ]
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement