BuddyPress Group Change on User Level Update

Hi… I have been searching high and low for a solution. Essentially, I am trying to do this https://s2member.com/kb-article/how-can-i-automatically-add-a-user-to-a-buddypress-group/ exact same thing when a user either upgrades or downgrades their account.

This site uses non-paid levels and it is possible people will upgrade or downgrade from their current levels. I am hoping to at the very least add them to a group associated for their new level and if possible remove them from the old group. Is is possible to update the code from on registration to on update?

Any help is appreciated.

Jeff

Sounds easy: you must only add “exit group” logic and to run the function by the “profile_update” hook.

It does sound easy… apparently not for me though. :slight_smile:

I have tried the profile_update and am a little unclear on the exit group logic. Any chance you can show me a sample?