Dominyka Posted July 12, 2023 Posted July 12, 2023 What is a hook to catch when a Member is changing groups? \IPS\Member has set_member_group_id( $value ), but I need to know what group they are changing from and what the new group is. In the "Recent Activity" I have logs like "Expiring purchase "X" changed group from "Y" to"Z"." - I need to hook into this moment. How?
Miss_B Posted July 12, 2023 Posted July 12, 2023 3 minutes ago, Dominyka said: What is a hook to catch when a Member is changing groups? \IPS\Member has set_member_group_id( $value ), but I need to know what group they are changing from and what the new group is. In the "Recent Activity" I have logs like "Expiring purchase "X" changed group from "Y" to"Z"." - I need to hook into this moment. How? You need to extent the \IPS\Member hook class. And the function that you need is called: public function save() Dominyka 1
Adriano Faria Posted July 12, 2023 Posted July 12, 2023 You can also create an app and add a MemberSync extension and add your stuff in onProfileUpdate method. Miss_B, Stuart Silvester and Dominyka 3
Dominyka Posted July 12, 2023 Author Posted July 12, 2023 Thank you! I was able to catch the new group ID. Miss_B 1
Recommended Posts