I have tried to remove the line “You are logged in as….” following the description on https://wp-event-organiser.com/blog/tutorial/where-should-i-put-code-from-the-tutorials/ and https://wp-event-organiser.com/forums/topic/security-you-are-logged-in-as-xxxxxxxx-xx-not-you/. I have add the snippet to my child functions.php: add_filter( ‘eventorganiser_fes_form_display_notices’, function( $notices ) {
unset( $notices[‘logged-in-as’] ); //remove logged-in-as notice
return $notices;
} );
THe line is not gone?
/Camilla

CAS A/S Camilla Nielsen
Hi Camilla,
That is for FES extension. For Pro you’ll want ot use the eventorganiser_booking_form_form_display_notices
filter instead.

Stephen Harris
Ok thanks – now the notice is hidden, but I want to show the form that shows when people are not logged in?

CAS A/S Camilla Nielsen
You can’t unfortunately. The name and email fields are removed as the booking is assigned to the logged-in user.

Stephen Harris
Ok – then I need to change the text and what if I want to add both email and name?
I have used following code:
//Change the logged-in notice to use display name rather than e-mail
if ( isset( $notices['logged-in'] ) ) {
$current_user = wp_get_current_user();
$notices['logged-in'] = sprintf(
__( 'Du er logget ind og bestiller som %s', 'eventorganiserp' ),
esc_attr( $current_user->display_name ),
esc_url( wp_logout_url( get_permalink() ) )
);
}

CAS A/S Camilla Nielsen
Certainly:
//Change the logged-in notice to use display name rather than e-mail
if ( isset( $notices['logged-in'] ) ) {
$current_user = wp_get_current_user();
$notices['logged-in'] = sprintf(
__( 'Du er logget ind og bestiller som %s (%s)', 'eventorganiserp' ),
esc_attr( $current_user->display_name ),
esc_attr( $current_user->user_email )
);
}

Stephen Harris
Hi – something is wrong – can you tell me what?
add_filter( 'eventorganiser_booking_form_form_display_notices', 'my_booking_form_notices', 10, 2 ); function my_booking_form_notices( $notices, $booking_form_view ) {
//Change the logged-in notice to use display name rather than e-mail if ( isset( $notices['logged-in'] ) ) { $current_user = wp_get_current_user(); $notices['logged-in'] = sprintf( __( 'Du er logget ind og bestiller som %s (%s)', 'eventorganiserp' ), esc_attr( $current_user->display_name ), esc_attr( $current_user->user_email ) ); }
//Remove the prior booking notice:
unset( $notices['prior-booking'] );
//Remove the prior booking notice:
//unset( $notices['logged-in'] );
return $notices; }
-
This reply was modified 8 years, 3 months ago by
CAS A/S Camilla Nielsen.

CAS A/S Camilla Nielsen
All the code is on online, following a comment. So its commented out.
Try laying it out as in my previous example.

Stephen Harris
How do I change this text – appearing when I made a booking?
Thank you for your booking. You shall receive an e-mail containing your tickets once we have confirmed payment

CAS A/S Camilla Nielsen
As follows:
add_filter( 'eventorganiser_pro_get_option_booking_complete_message_offline', function( $message ) {
return 'new message';
} );

Stephen Harris
And where do I change the words?

CAS A/S Camilla Nielsen
Another question – if I would like to receive a notification mail when someone booked a ticket, where do I put my email?

CAS A/S Camilla Nielsen
You replace ‘new message’ with whatever message you desire.
The site admin gets notified (if such notifications are enabled). There are filters available to alter that behaviour, there’s also an extension which adds a UI option. You can find both here: http://docs.wp-event-organiser.com/bookings/notification-emails/

Stephen Harris