Events Manager
[resolved] Hook into regiatrstion? (5 posts)

  1. gabbsmo
    Posted 3 years ago #

    I'm evaluating different soultions for event registrstion. One of the requirements is that only users with a certain amounts points should be able to attend a event. I'm intending to store this points field in the database and read it when a user attempt to register for a event.

    Is there a hook in EM that allows this?


  2. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 3 years ago #

    there's quite a few hooks in EM, so there's various places you could do this.

    I guess the best one would be

    return apply_filters('em_bookings_is_open', $return, $this);

    in classes/em-bookings.php which you can set $return to true/false depending if you want bookings to be available or not.

  3. gabbsmo
    Posted 3 years ago #

    There is no documentation for the available hooks in EM?

  4. gabbsmo
    Posted 3 years ago #

    Would somethings like this in functions.php disable the sign up form for non eligible users?

    add_filter('em_bookings_is_open', has_points, 10, 0);

    function has_points() {
    if($points > 0)
    return true;
    return false;

    Does em_bookings_is_open just control the form or the registration process itself. Even if I set it to false, would a clever person still be able to sign up through a HTTP request?

  5. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 3 years ago #

    not at the moment. hoping to add more docs and codex soon

    this filter should work and it wouldn't be possible to circumvent it as this check should be done server-side before actually adding the booking

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Events Manager
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic