Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support angelo_nwl

    (@angelo_nwl)

    sorry, am afraid that this isn’t possible at the moment without custom php coding.

    Thread Starter neodyme

    (@neodyme)

    Thank you for your answer. You are right i had to add some php code, this is my working solution :

    function add_user_to_group_callback( $registration, $EM_Booking, $EM_Notices )
    {
    	//get user id
    	$user_id = $EM_Booking->person_id;
    
    	//get group id
    	$group_id = $EM_Booking->event->group_id;
    
    	if( !$user_id || !$group_id) return false;
    	groups_accept_invite( $user_id, $group_id );
    
    	return $registration;
    }
    
    add_filter('em_booking_add_registration_result', 'add_user_to_group_callback', '', 10, 3, $registration, $EM_Booking, $EM_Notices);
    Plugin Support angelo_nwl

    (@angelo_nwl)

    great, thanks for sharing. am sure that this will be useful for others as well.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘register user to group when booking event’ is closed to new replies.