You don’t want to remove the member via single Group > Admin > Members? Or are you considering removing a handful of members from the group/s?
Hi @mercime ,
What I am doing is when a User gets accepted into a group I’m automatically assigning them a set of permissions as well through an attached function.
add_action( 'groups_membership_accepted', 'my_function' );
But when someone is being removed from a group (through Group > Admin > Members) I can’t seem to find the action for that.
add_action( 'groups_membership_removed?', 'my_other_function' );
ahh, thanks heaps! Couldn’t find that anywhere
@mercime
Sorry, have one more question! Stuck on a similar issue again, the groups_remove_member worked a treat
, but I also need to hook a function for when a person clicks “leave group” on their own accord.
`add_action( ‘groups_leave_group‘, ‘function_here’ );`
I tried ‘groups_leave_group’ but this doesn’t seem to work (unless I’m doing something stupid).
Also I was wondering if you could clear up what the “screen” means in the actions like groups_screen_group_forum
groups_screen_group_members
groups_screen_group_invite
groups_screen_group_leave
Really appreciate your help so far!
Can’t seem to get this working, I’ll just disable the ability to let people leave for now (so they can only be removed by admin). Doesn’t matter too much as the site is only private groups.