
Stephen Harris
Hi Paul,
The most likely issue here is that the cookie nonce has expired. They should last 12 hours, so I wouldn’t expect this error. But one possible cause is the caching plugin. If that cache lasts longer than 12 hours then that nonce value will be caught in that cache and maybe used after its expired.
If you disable caching for booking form page, and see if you get any further instances.
I’ve noticed that when the cookie nonce has expired, a new one is returned so its possible to implement a re-try mechanism which I will do in a future update to mitigate the issue.

Stephen Harris
Hi Jef,
Which emails are sent out? Booking confirmation emails are (should) only sent out when the booking is transitioned to the confirmed status (they are hooked onto transition_post_status
). (Which might happen immediately if the booking is free).
In the settings, under “Notify me when” do you have “A new booking is made” checked? If so, that will be sent as soon as the booking is created, but before a payment gateway is selected (and only to the admin).
If it is the confirmation emails, add the following to your wp-config.php
define( 'EVENTORGANISER_DEBUG', 'debug');
and then add this snippet to record booking transitions:
add_action('eventorganiser_transition_booking_status', function($new_status, $old_status, $booking){
$container = eo_pro_get_container();
$logger = $container[\EventOrganiserPro\Logger\AbstractLogger::class];
$logger->debug("Booking {$booking->ID} $old_status --> $new_status");
}, 10, 3);
That will log any booking status transition, if the issue should recur that will provide some information as to what statuses the booking transitions to/from and when.

Stephen Harris
Hi Paul,
I can see the license key is correctly registered, and its not clear why it would be reporting as invalid. If you click the “?” icon what error code/message do you see?
The plug-in should still function however. With the plug-in (and Pro) active, can you see “Discount Codes” under “Events” in the navigation menu? If you then proceed to fill in the form to create a discount code, to you get an error of any sort?
To make the discount code form field available on the booking form, go to Settings > Event Organiser > Booking Form. On the right you should see “Advance Fields” and clicking “discount codes” should add it the bottom of the form; you should then be able to drag-and-drop it to re-order the fields.

Stephen Harris
Hi Florian,
With the FES add-on, when an event is created the following hook is triggered: eventorganiser_fes_submitted_event
. You can use that to create the event’s tickets
Untested, but should work:
add_action('eventorganiser_fes_submitted_event', function($event_id, $event, $form) {
$dates = eo_get_the_occurrences($event_id);
$occurrence_ids = array_keys($dates);
eventorganiser_insert_ticket( $this->event_id, array(
'name' => 'Ticket A',
'price' => 3.25,
'spaces' => 5,
'occurrence_ids' => $occurrence_ids, //required for recurring events, if booking by date
'order' => 1,
) );
}, 10, 3);

Stephen Harris
This is possible, through the booking form API you can add “attendee questions”, and to that add a field for entering who the ticket is for.
The details of that depend exactly on your client’s requirements. For instance, how do they want to the user to identify who the ticket is for? It could be a dropdown, a free-input or something a bit more complicated. If its a free-input, can I assign the ticket to an individual who isn’t a member? If so, then the example given here might be sufficient: https://wp-event-organiser.com/blog/tutorial/attendee-questions/ (see attached a subset of the code in that blog post). If not then you would need some form of input to select a user, and then store that user ID.
For the second part, including the members in email notifications is reasonably straightforward provided it suffices to CC or BCC the ticket holder:
add_filter( 'eventorganiser_booking_confirmed_email_headers', function( $headers, $booking_id ) {
//iterate over every ticket
$tickets = eo_get_booking_tickets($booking_id);
if($tickets) {
foreach($tickets as $ticket) {
//extract associated email
$email = eo_get_booking_ticket_meta( $ticket->id(), '_eo_booking_meta_attendee-email', true );
//CC ticket holder
$headers[] = "Cc: $email"
}
}
return $headers;
}, 10, 2 );
In the above (untested) code we assumes you’ve implemented the code in the above link. We extract the emails from the tidckets and CC them in the booking confirmation email.
If instead your client wants to ensure tickets are assigned to known members, then it might be better to store a user ID (instead of name/email), and in that instance we’d need to modify the code slightly to get the email from the user ID.

Stephen Harris
Hi Kim,
When a user is logged-in, and using the REST API (which is what the booking/payments does), a randomly generated string (a nonce) is sent to prevent cross-origin request attacks.
In this instance, it appears that string is not being sent, or an incorrectly value is sent, or otherwise the validation of that string is failing. I can’t replicate this issue, so it might be particular to your set-up, but if you are able to provide access to the site, I’ll be happy to investigate further. Please get in touch via this form: https://wp-event-organiser.com/contact/

Owen Morris
Hi Stephen,
I am using EO Pro on a members website where a number of event organisers would like to allow one member to book on behalf of other members in a single booking, but also to know who has booked what (ie not just that Member A has booked 3 tickets, but that Member A has booked tickets for Member B and Member C etc). The bookings are quite often for conference style events, where each member will book a range of tickets for a single event to build up an individual package. Currently a member can book multiples for each ticket, but it isn’t clear who each ticket is booked for. It is also desirable that event emails are sent to all attending members, rather than just the person who made the booking.
You have mentioned in previous posts the ability to have per ticket meta via an API, but I can’t clearly see how to access this, and I’m not sure this would be ideal for the conference style bookings.
With the recent changes to the booking form system, is there a way that eg an extra form could be generated to book tickets for a second/third person before proceeding to the payment form?

Laurence Manchee
hi this same issue is happening for me too and when i add
($qty === 0) {
// skip tickets not selected in the booking form.
continue;
}
to line 333 it makes the page not work
Do you guys have a new fix for this/
Thanks
Laurence.
p.s. if it is any help, the ticket with 0 quanity is the last one in my ticket list.
-
This reply was modified 5 years, 6 months ago by
Laurence Manchee.

Stephen Harris
1) I can’t reproduce this, additionally
doesn’t appear in the code base (or at least not on anything impacting the front-end. Could this be a result of text translation?
2) Looks like its harder than it should be (https://stackoverflow.com/questions/15738259/disabling-chrome-autofill) – (The plug-in actually sets autocomplete="off"
in templates/eo-booking-form.php
– so you might want to try some of the other suggestions, such as autocomplete="false"
)

CYCOffice
Hello,
I have not updated to the latest version of Event organiser pro, it has been working well for us all year.
Now I no longer see the options to setup tickets. I have an option to set the max number of tickets and the booking form, but not the options to add individual ticket types with prices.
Is this because I’m on an old version?
Cheers
Mark

Olaf Lederer
Previous month I did some updates to the pro and front end submission form and since then the names of the subscriber are empty in the database. I use the meta field value for “_eo_booking_meta_name” at front-end.
Please check these screenshots to see the difference.
https://i.imgur.com/WEtFk3b.jpg
https://i.imgur.com/arqZaZk.jpg
PS. I have maybe 1 question a year. It should help if you put an autoresponder on this email address wp.event.organiser@gmail.com (or just answer these emails)

Paul Newbery
Hi Stephen,
Many thanks for that I have sucessfully added attendee questions on to my booking form, however im a little unsure about the CSV export, on the filter how do this relate to my new field ids i.e. is first name and last name example id’s as they dont match any thing in the example where you have the attendee questions.
add_filter( ‘eventorganiser_export_tickets_headers’, function( $columns ) {
$columns[‘ticket_first_name’] = ‘Ticket Holder (first name)’;
$columns[‘ticket_last_name’] = ‘Ticket Holder (last name)’;
$columns[‘ticket_email’] = ‘Ticket Holder Email’;
return $columns;
} );

Stephen Harris
Hi Paul,
Yes – but it would be 3 extra fields, not 2. When you create a booking form you can add fields, but these are tied to the booking, not a particular ticket/person. You can then use ‘attendee questions’, these are repeatable fields that are repeated for each ticket selected.
Please note, that “attendee questions” are not currently available in the UI and have to be added in code.
More details can be found here: https://wp-event-organiser.com/blog/tutorial/attendee-questions/

Paul Newbery
Hi
My client takes group bookings, i.e. a parent makes a booking for multiple childern. Is it possible to create additional field depending on the number of places booked
i.e. if a parent books 3 children
additional 2 boxes for childs name and additional 2 boxes for the age etc . These fields also need to mandatory.
hopefully that makes sense

Ian Clarke
we manage a training calendar that advertises courses by different trainers in various locations. is it possible to have booking “notification” emails sent to trainers email addresses when users book their courses from our calendar. So, Trainer A gets an email to inform them when people are booking their course(s) ?
Or do all bookings get email notifications to the same address (by default WP admin) ?