I have a requirement where I already have members subscribed to the free level. We want to offer these members an option to change to a different level, also free, just by clicking a confirmation link in an email.
I have set up level 1 as the new level and since there is no payment required all I need to do on confirmation is change the role to s2member level 1. I have all the work complete to do that and confirmations are processed correctly and the member is now at level 1.
The problem:
I’m also integrating with Mailchimp and I have different lists set for level 0 and level 1 so I want the member to be removed from the list at level 0 and added to the list at level 1.
If I change the membership level through the admin screen this works fine but when I change it in PHP from clicking the email confirmation the transition form one list to the other doesn’t happen.
To change roles I am simply executing $user->set_role(‘s2member_level1’); but I’ve also tried remove_role and add_role with no success.
Is there a hook I can call before/after/during the role change to get the list updates to happen?
Thanks
Spikedog