Hi..
I have an issue with regards to the final place for an event being sold.
When the last ticket is sold, the user gets the usual ‘THANK YOU’ message, however, the site also then displays the ‘this event is fully subscribed’ message also.
This is a bit confusing and sending a mixed message.
Is there any way to avoid displaying the fully subscribed message upon completion of a successful booking, even when it is the last ticket?
thanks

Jonny Sams
Hi Johnny,
I agree, the “event full” message should be suppressed when a booking has just been made.
This will be fixed in the next update, but the following will fix it in the mean time. Simply add the following to your theme’s functions.php
(or preferably a dedicated or site-utility plug-in).
function myprefix_suppress_sold_out_message( $message ){
if( !empty( $_GET['booking-confirmation'] ) ){
return false;
}
return $message;
}
add_filter( 'eventorganiser_booking_tickets_sold_out', 'myprefix_suppress_sold_out_message' );

Stephen Harris
Hi,
Thanks for that…. It nearly works, however, adding this causes the booking form to reappear on the page, so we get a thank you message and then the booking form.
Is there any way of just displaying a thank you message on the confirmation and hiding the booking form to avoid confusion?
thanks again

Jonny Sams
Hi Johnny,
If you’re using the default booking form template, then that shouldn’t happen. In general the form will only appear if there are tickets available. Are you perhaps using a custom booking for template?

Stephen Harris
Hi… sorry.
I had been testing the wrong event.
I tested with booking the last place on an event and the code you provided hasn’t worked… it still gives me the ‘fully subscribed’ text.
You can see the page here if it’s any help…. this event has only 1 space available
http://www.bridgestolearning.org.uk/events/event/test-event-3/

Jonny Sams
Where did you add the above code?

Stephen Harris
It has been added into my theme’s functions.php file.
is there a good way of allowing you access to this to see or any indications of what i may be doing wrong?
I am using the regular booking form, however there are additional fields added to the form

Jonny Sams
Hi Jonny,
Feel free to get in touch via this form and I’ll take a look for you.

Stephen Harris
Just an update here for anyone else following this thread.
The text that was appearing had been added to the template itself, hence the above fix would not work. (Currently) there is no UI message for altering the “sold out” text.
However, you can copy the booking form template (event-organiser-pro/templates/eo-booking-form.php
) into your theme and make changes there. However, the recommended way to make this change is to instead add the following to a dedicated plug-in or your theme’s functions.php
:
function myprefix_suppress_sold_out_message( $message ){
return "My sold out message...";
}
add_filter( 'eventorganiser_booking_tickets_sold_out', 'myprefix_suppress_sold_out_message' );
Added in this way, in 1.8, the message will not appear if the user has just purchased the last remaining ticket.

Stephen Harris