Auto-create player when registering via Paid Memberships Pro
-
I’m developing a golf league website. I’m currently trying to use Paid Memberships Pro to handle memberships. I also need to record hole-by-hole scores for each player, so I’m testing out SportsPress to see if it will work for our needs. I’m trying to develop an integration so that a SportsPress player will be created when a user registers for membership. Paid Memberships Pro doesn’t use the standard WP user registration form, so I need to create the integration myself.
What I think I want to do is call the user_register() function in your sportspress/modules/sportspress-user-registration.php file. I’ve added the following code in my functions.php file, but it isn’t working:
// Create SportsPress player profile linked to user account
function add_sportpress_player( $user_id ) {
do_action (‘user_register’, $user_id);
return;
};// add the action
add_action( ‘pmpro_after_checkout’, ‘add_sportpress_player’, 10, 1 );Can you offer any suggestions? If I can get this working, I will be purchasing a SportsPress Pro license.
Thanks.
- The topic ‘Auto-create player when registering via Paid Memberships Pro’ is closed to new replies.