Hello,
If I choose to allow bookings only for registred users, I need a link to allow them creating a new account. At this moment, it display the login feature, but not the registering feature. Could you help me doing this ?
The automatic user account creation could fit to me except I would like to offer the possibility for the user to subscribe to the newsletter, which I can do with the built-in register system of WordPress.
Thx

Nicolas Massart
Hi Nicolas,
The easiest way is probably to change the message that appears to logged-out users
add_filter( 'eventorganiser_booking_login_required', 'my_login_required_message' );
function my_login_required_message(){
$register_link = site_url('/wp-login.php?action=register&redirect_to=' . get_permalink());
return "<p>Only logged in users can place bookings, you can register <a href='".$register_link."'>here</a></p>
}
That can in a site utility plug-in (and although not recommended, a theme’s functions.php
). Or you can edit the template eo-booking-form.php
(after copying it to your theme).

Stephen Harris
Thanks, it works, the correct code is this one :
add_filter( 'eventorganiser_booking_login_required', 'my_login_required_message' );
function my_login_required_message(){
$register_link = site_url('/wp-login.php?action=register&redirect_to=' . get_permalink());
return "<p>Only logged in users can place bookings, you can register <a href='".$register_link."'>here</a></p>";
}

Nicolas Massart
Ah, missing the ending quotation mark "
– thanks for posting the update.

Stephen Harris