//* Please do NOT include the opening php tag, except of course if you’re starting with a blank file
// display a contact form when the event is sold out
// for waitlists
function espresso_clean_event_status( $EVT_ID ) {
$event = EEH_Event_View::get_event( $EVT_ID );
$status = $event instanceof EE_Event ? $event->get_active_status() : ‘inactive’;
return $status;
}
add_action( ‘AHEE_event_details_after_the_content’, ‘ee_special_sold_out_message’ );
function ee_special_sold_out_message( $post ) {
if ( espresso_clean_event_status() == ‘Sold Out’ ){
echo do_shortcode( ‘[contact-form-7 id=”180″ title=”Contact form 1″]’ );
}
}
The support post ‘Waitlist and Contact Form 7’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.
Support forum for Event Espresso 3 and Event Espresso 4.