eventorganiser_new_booking hook

This topic contains 4 replies, has 2 voices, and was last updated by  Stephen Harris 1 week, 5 days ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #37986

    I’m trying to sign-up attendees who opt-in, to MailChimp. I’m using:

    function afs_event_registration_callback($booking_id) {
           $submit_data = array();
           $submit_data['email'] = eo_get_booking_meta($booking_id, 'bookee_email', $single = true);
           $submit_data['firstname'] = eo_get_booking_meta($booking_id, 'bookee_first_name', $single = true);
           $submit_data['lastname'] = eo_get_booking_meta($booking_id, 'bookee_last_name', $single = true);
          afs_mailchimp_post($submit_data, $list_id);
        add_action('eventorganiser_new_booking', 'afs_event_registration_callback', 10, 1);

    However the booking has an ‘incomplete’ status and the Ajax form still displays with no confirmation message. It looks like a 500 internal server error is happening as you can see in this image from dev tools.


    If I comment out the hook, the booking is confirmed fine. Is this the right hook to use for what I am trying to do?

    Many thanks

    Joan Conrow

    I have sorted the 500 error which was a problem with a custom function (sorry). The booking now goes through as ‘confirmed’.

    However the form not showing the success message is a still a problem: no confirmation is shown and it is confusing to users. Any ideas on how to debug this please?

    Joan Conrow

    So even if I use the redirect to a page option, nothing happens on screen after a booking is made.

    The booking is made and a confirmation email is sent out.

    Joan Conrow

    OK, this is sorted now. A function written by a previous developer was echoing some content out which was preventing the redirect presumably by interfering with the EO Ajax call.

    Joan Conrow

    Hi Joan,

    Glad you were able to this sorted.

    Stephen Harris
Viewing 5 posts - 1 through 5 (of 5 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.