-
-
Save anonymous/b714865100284d6177e0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* 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( $post->ID ) == 'DTE' || espresso_clean_event_status( $post->ID ) == 'DTS' ){ | |
if( function_exists( 'ninja_forms_display_form' ) ){ ninja_forms_display_form( 1 ); } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment