Skip to content

Instantly share code, notes, and snippets.

@sidharrell
Last active December 19, 2015 08:18
Show Gist options
  • Save sidharrell/5924285 to your computer and use it in GitHub Desktop.
Save sidharrell/5924285 to your computer and use it in GitHub Desktop.
send confirmation email to just primary attendee
function customized_espresso_email_after_payment($payment_data) {
global $org_options;
if ($payment_data['payment_status'] == 'Completed') {
event_espresso_send_payment_notification(array('attendee_id' => $payment_data['attendee_id'], 'registration_id' => $payment_data['registration_id']));
if ($org_options['email_before_payment'] == 'N') {
event_espresso_email_confirmations(array('attendee_id' => $payment_data['attendee_id'], 'registration_id' => $payment_data['registration_id'], 'send_admin_email' => 'true', 'send_attendee_email' => 'true'));
}
}
remove_action('action_hook_espresso_email_after_payment','espresso_email_after_payment');
}
add_action('action_hook_espresso_email_after_payment','customized_espresso_email_after_payment', 5);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment