do_action('book_session_participant', $current_user, $event, $current_user->user_email);
                    do_action('book_session_responsable', $current_user, $event, get_user_meta($current_user->id, 'responsable_email', true));
                    do_action('book_session_admin', $current_user, $event, get_option('admin_email'));
                    display_modal($response["notice"]);
                }
            }
        }
    } else {
        display_modal('Vous êtes déjà inscrit à cette session.');
    }
} else {
    if (isset($_POST['unsubscribe'])) {
        $event = get_post($_POST['event_id']);
        $is_subscribed = $users_events->user_subscribed($current_user, $event);
        if ($is_subscribed) {
            $users_events->remove($current_user, $event);
            display_modal('Vous avez bien été désinscrit de cette session.');
        } else {
            display_modal("Vous n'êtes pas encore inscrit à cette session.");
        }
    }
}
$events_label_singular = tribe_get_event_label_singular();
$events_label_plural = tribe_get_event_label_plural();
$event_id = get_the_ID();
$event_start_date = get_post_meta($event_id, '_EventStartDate', true);
$event_passed = new DateTime() >= new DateTime($event_start_date);
?>

<div id="tribe-events-content" class="tribe-events-single">
<?php