<?php


add_action("wp_ajax_nopriv_xs_register", "xs_register");
add_action("wp_ajax_xs_register", "xs_register");

function xs_register() {
  $email    = $_POST['email'];
  $comment  = $_POST['comment'];
  $name     = $_POST['name'];
  $phone    = $_POST['phone'];
 // $package    = $_POST['package'];
  $event_title = $_POST['event_title'];

  if(trim($email) == '' || trim($name) == '' || trim($phone) == '' ){
    wp_die();
  }
 /*
if($package == 'free'){
require ( get_template_directory() . '/framework/components/event-user-register/free-register.php' );
}else{
// do paypal

}
 */
require ( get_template_directory() . '/framework/components/event-user-register/free-register.php' );

}