Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Greetings, could you please describe what rule(s) to modify to achieve this?
I have one kind of membership, and want it mapped to one role. Thanks!
Comments
Comment #1
zkrebs CreditAttribution: zkrebs commentedI edited " "Apply subscription if line item is subscription product" rule,
Added Action:
Add user role
Parameter: User: [site:current-user], Roles: Member"
Seemed to work.
Comment #2
likewhoa CreditAttribution: likewhoa commentedthe actual correct way to do this is by doing the following.
Comment #3
pinkonomy CreditAttribution: pinkonomy commented@likewhoa
Hi,
is this possible to write this also when subscirption ends?
I am interested in giving the user a different role when his subscription ends.
Thanks!
Comment #4
likewhoa CreditAttribution: likewhoa commented@pinkonomy sure, just add a second action on the subscription end rule to add the new role after removing the old.
Comment #5
mstrelan CreditAttribution: mstrelan commentedI would suggest it's slightly more efficient to add the roles to the ruleset "Subscription start" at admin/config/workflow/rules/components/manage/rules_commerce_sp_subscription_start as then you don't have to repeat yourself in step 6.