You’d have to hook into filters like em_booking_get_post and em_booking_save to save that information. The place you’re adding it in booking_meta should be in ‘booking’, not ‘registration’
I tried to add an action hook to em_booking_save and to em_booking_add, but it’s still not working for registered users.
function em_booking_save_plus() {
$_REQUEST[‘cracha’] = (!empty($_REQUEST[‘cracha’])) ? $_REQUEST[‘cracha’]:”;
$EM_Booking->booking_meta[‘booking’] = array(‘cracha’ => $_REQUEST[‘cracha’]);
}
add_action(’em_booking_add’,’em_booking_save_plus’);
add_action(’em_booking_save’,’em_booking_save_plus’);
I’m at a loss as to why registered users aren’t getting the fields saved. The booking_meta column is only written as of a unregistered user creating a booking.
hi,
you’d have to save them somewhere like in the em_meta table or in the booking_meta field of the booking table (stored as a serialized array, so add to it, don’t replace it) and bring it up elsewhere. If you read the tutorials, you could quite easily add extra fields etc.
http://wp-events-plugin.com/tutorials/ – slightly different walkthrough, but similar concept
Thanks for the help!
I discovered that i needed to alter one more function for registered users input to be saved. Now everything is working quite fine.
Now i have only one more request, and that would be to know wich function would i call to add a special booking to a user if, and only if, he submitted a file through another plugin ? If he submitted the file i have a script that e-mails him, i want to make this “e-mail script” book a place for him too. Is that possible ? ( if this needs another topic, please tell me )