-
-
Save joshfeck/2e13332786afaeb46e10703d75264877 to your computer and use it in GitHub Desktop.
Add a ninja form contact form to an event that has at least one sold out ticket. Useful for capturing names for a waiting list.
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 | |
add_filter( 'FHEE__ticket_selector_chart_template__ticket_sold_out_msg', 'ee_ticket_sold_out_link', 11 ); | |
function ee_ticket_sold_out_link() { | |
return '<a href="#waitlist">Join Waiting List</a>'; | |
} | |
add_filter( 'FHEE__ticket_selector_chart_template__ticket_sold_out_msg', 'ee_ticket_sold_out_message' ); | |
function ee_ticket_sold_out_message() { | |
add_action( 'AHEE_event_details_after_post', 'display_ee_ticket_sold_out_message' ); | |
} | |
function display_ee_ticket_sold_out_message() { | |
echo '<div id="waitlist">'; | |
echo '<p>You can sign up for the waiting list here</p>'; | |
if( function_exists( 'ninja_forms_display_form' ) ){ ninja_forms_display_form( 1 ); } | |
echo '</div>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment