This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Save user registration entry data to ACF field when activating user based on their original submission | |
add_action( 'gform_activate_user', 'after_user_activate', 10, 3 ); | |
function after_user_activate( $user_id, $user_data, $signup_meta ) { | |
$taxonomies = array( | |
'sport_type', | |
'age_range', | |
'school_year', | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Save user sport interests when activating user based on their original submission | |
add_action( 'gform_activate_user', 'after_user_activate', 10, 3 ); | |
function after_user_activate( $user_id, $user_data, $signup_meta ) { | |
$sports_string = get_user_meta($user_id, 'sports_interested_in', true); | |
$sports_slug_array = explode(', ', $sports_string); | |
$sports_array = array(); | |
foreach($sports_slug_array as $sports_slug) { |