We want prevent against E-Mail errors so
how can we set an Double Opt in for bookings?

Christoph Steinlechner
Hi Christoph,
So this would require a user to click a link in the e-mail before the booking is confirmed? I assume this is for free bookings?
That’s doable, and I’ll outline how below
(The codex is in the process of being updated, and some hooks/functions are not documented on the official codex, so I’ve linked to a personal ‘beta’ version)
1) You’ll want to generate some form of random code or ‘hash’ when the booking is created. This hook http://stephenharris.info/codex/hook-eventorganiser_transition_booking_status.html will fire when a booking changes status and you can you check for the ‘new’ status (not actually a status, but is the ‘old status’ value when a new booking is created). The booking object (third argument) is a WP_Post
instance, so you can generate a key and store it in the meta data.
2) You can register your own email tag for including a link with which to confirm the booking: http://wp-event-organiser.com/blog/tutorial/including-custom-fields-confirmation-e-mail/ – using the booking ID to retrieve the appropriate value
3) That url should include the code and the booking (something like yoursite.com/booking-confirmation/{booking-id}/{code}
). You’ll need to set it up so that hitting that url will cause a script to run which looks up the booking and compares the stored code with the one in the url to ensure they match. If they do, you can confirm the booking.
4) Lastly you’ll want to make sure that the booking stays at ‘pending’ by preventing the auto-confirm for free bookings: http://wp-event-organiser.com/forums/topic/manually-confirm-free-bookings/

Stephen Harris