-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
do not send allergy email to community team
- Loading branch information
1 parent
ea05b99
commit efd331c
Showing
1 changed file
with
0 additions
and
14 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -322,19 +322,12 @@ protected function maybe_send_notification_email( $value, $attendee ) { | |
$post_type_object = get_post_type_object( $attendee->post_type ); | ||
$attendee_link = add_query_arg( 'action', 'edit', admin_url( sprintf( $post_type_object->_edit_link, $attendee->ID ) ) ); | ||
$handbook_link = 'https://make.wordpress.org/community/handbook/wordcamp-organizer/planning-details/selling-tickets/life-threatening-allergies/'; | ||
$support_email = '[email protected]'; | ||
$recipients = array( | ||
$current_wordcamp->meta['Email Address'][0], // Lead organizer | ||
$current_wordcamp->meta['E-mail Address'][0], // City address | ||
$support_email, | ||
); | ||
|
||
foreach ( $recipients as $recipient ) { | ||
if ( $support_email === $recipient ) { | ||
// Make sure the email to WordCamp Central is in English. | ||
add_filter( 'locale', array( $this, 'set_locale_to_en_US' ) ); | ||
} | ||
|
||
$subject = sprintf( | ||
/* translators: Email subject line. The %s placeholder is the name of a WordCamp. */ | ||
wp_strip_all_tags( __( 'An attendee who has a life-threatening allergy has registered for %s', 'wordcamporg' ) ), | ||
|
@@ -344,9 +337,6 @@ protected function maybe_send_notification_email( $value, $attendee ) { | |
$message_line_1 = wp_strip_all_tags( __( 'The following attendee has indicated that they have a life-threatening allergy. Please note that this information is confidential.', 'wordcamporg' ) ); | ||
|
||
$message_line_2 = wp_strip_all_tags( __( 'Please follow the procedure outlined in the WordCamp Organizer Handbook to ensure the health and safety of this event\'s attendees.', 'wordcamporg' ) ); | ||
if ( $support_email === $recipient ) { | ||
$message_line_2 = 'Please check in with the organizing team to ensure they\'re following the procedure outlined in the WordCamp Organizer Handbook to ensure the health and safety of this event\'s attendees.'; | ||
} | ||
|
||
$message = sprintf( | ||
"%s\n\n%s\n\n%s\n\n%s", | ||
|
@@ -356,10 +346,6 @@ protected function maybe_send_notification_email( $value, $attendee ) { | |
$handbook_link // Link to page in WordCamp Organizer Handbook. | ||
); | ||
|
||
if ( $support_email === $recipient ) { | ||
remove_filter( 'locale', array( $this, 'set_locale_to_en_US' ) ); | ||
} | ||
|
||
wp_mail( $recipient, $subject, $message ); | ||
} | ||
|
||
|