I want to implement gifting memberships. In short, I'm trying to hook into the process of getting a new membership.
When the membership has a specific id the membership is removed from the user who bought it, and its id gets stored in combination with a token in my db.
Whenever you call a specific URL (with the generated token) the membership id is transferred to the user who called the URL.
Currently, I'm hooking into the init action and check if ms_relationship_id is in the URL. but there's probably an action which is called after a membership is bought.
Tried around ~20 actions yesterday, but there are no docs and things like save_event, ... didn't work.
And ofc I need to disable the default mail for this membership, since "your membership is now activated" is simply wrong in this case.