Add the sample code below to your child theme's functions.php file or in a site specific plugin and sold out events will be excluded from the events calendar. Uncomment (i.e. remove the //) for postponed and cancelled to hide those events from your events calendar as well.
<?php
//* Do NOT include the opening php tag
//* Exclude certain events from the events calendar for Event Espresso
function ee_hide_certain_event_statuses_from_events_calendar( $public_event_stati ) {
unset( $public_event_stati[ EEM_Event::sold_out ] );
// unset( $public_event_stati[ EEM_Event::postponed ] );
// unset( $public_event_stati[ EEM_Event::cancelled ] );
return $public_event_stati;
}
add_filter( 'AFEE__EED_Espresso_Calendar__get_calendar_events__public_event_stati', 'ee_hide_certain_event_statuses_from_events_calendar', 10, 1 );
References:
https://eventespresso.com/topic/sold-out-notification-on-event-calendar/
http://eventespresso.com/topic/ee4-i-dont-want-calendar-to-show-sold-out-events/
See more recommendations for Event Espresso:
http://enzo12.com/labs/event-espresso/