Skip to content

Instantly share code, notes, and snippets.

@Pebblo
Created April 1, 2020 15:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Pebblo/8d50e77a9edaced9624da89883c74563 to your computer and use it in GitHub Desktop.
Save Pebblo/8d50e77a9edaced9624da89883c74563 to your computer and use it in GitHub Desktop.
Force the confirm_email question type to be visible when editing the Address Information system question group.
<?php // Please do not include the opening PHP tag if you already have one.
// This snippet forces the 'confirm_email' question type to be visible on the Address Information system question.
// Add this snippet to your site and go to Event Espresso -> Registrations Form -> Question Groups -> Address information.
// Find the 'Confirm Email' question, UNcheck it so it is no longer set in that question group and save.
// Now remove this snippet again.
add_filter('FHEE__EEM_Question__system_questions_allowed_in_system_question_group__return', 'tw_ee_force_confirm_email_to_show', 10, 2);
function tw_ee_force_confirm_email_to_show($question_system_ids, $system_question_group_id) {
if( $system_question_group_id === EEM_Question_Group::system_address ) {
$question_system_ids[] = EEM_Attendee::system_question_email_confirm;
}
return $question_system_ids;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment