Duplicate Snippet
Embed Snippet on Your Site
MemberPress: Assigning BuddyPress Member Type on Membership Signup
This code snippet assigns a specific BuddyPress member type when a user completes a signup in MemberPress. It hooks into the mepr-event-member-signup-completed action and assigns the defined member type using bp_set_member_type() based on the user's ID.
The sample code uses a dummy" member_type" BuddyPress Member Type.
To use the code, the dummy "member_type" should be replaced with the actual desired member type on this line:
bp_set_member_type($user->ID, 'member_type');
Code Preview
php
| |
| |
| |
| |
| |
Comments