I have several upcoming competition-related events where I need to control the maximum number of tickets allowed in a single booking. I’ve searched the forums and found examples of how to do this but none of them appear to handle the specific behavior I’m trying to accomplish.
I want to limit total attendance at 300 for each event with each booking having up to 4 competitors. It’s okay if someone creates multiple bookings but each booking allows at most 4. I’m using the https://wp-event-organiser.com/blog/tutorial/attendee-questions/ tutorial as a basis to get 5 fields of information about each ticket (ie – competitor), and I’m using information from https://wp-event-organiser.com/forums/topic/limiting-number-of-tickets-in-a-booking/ to limit the tickets in a booking.
I can see a scenario where someone selects a ticket count of 6 then proceeds to enter 5 fields of information for 6 people, then when the “Book” button is clicked an error is returned because I put a maximum limit of 4 people per booking. The quantity field will allow a max value equal to the number of tickets remaining. Is there a hook I can call to override the quantity field’s max value, assuming the number of remaining tickets is greater than my 4 people limit?
Thx!
Robert Stankey