Skip to content

Instantly share code, notes, and snippets.

@andrasguseo
Forked from cliffordp/functions.php
Created November 1, 2017 21:25
Show Gist options
  • Select an option

  • Save andrasguseo/314219adf541e044a4e1569ce1ddb534 to your computer and use it in GitHub Desktop.

Select an option

Save andrasguseo/314219adf541e044a4e1569ce1ddb534 to your computer and use it in GitHub Desktop.

Revisions

  1. @cliffordp cliffordp revised this gist Apr 21, 2017. 1 changed file with 5 additions and 5 deletions.
    10 changes: 5 additions & 5 deletions functions.php
    Original file line number Diff line number Diff line change
    @@ -20,11 +20,11 @@ function cliff_et_rsvp_bcc_admin_and_more_ticket() {

    // add each BCC email if it's a valid email address
    foreach ( $bccs as $bcc ) {
    $bcc = sanitize_email( $bcc );
    if ( is_email( $bcc ) ) {
    $headers[] = sprintf( 'Bcc: %s', $bcc );
    }
    $bcc = sanitize_email( $bcc );
    if ( is_email( $bcc ) ) {
    $headers[] = sprintf( 'Bcc: %s', $bcc );
    }
    }

    return $headers;
  2. @cliffordp cliffordp revised this gist Apr 21, 2017. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions functions.php
    Original file line number Diff line number Diff line change
    @@ -8,7 +8,7 @@
    *
    * @link https://developer.wordpress.org/reference/functions/wp_mail/#comment-349
    */
    function cliff_et_rsvp_bcc_admin_and_other_ticket() {
    function cliff_et_rsvp_bcc_admin_and_more_ticket() {
    $bccs = array(
    get_option( 'admin_email' ), // the site admin email, probably do not want to edit this line
    '[email protected]', // edit or delete this line
    @@ -29,4 +29,4 @@ function cliff_et_rsvp_bcc_admin_and_other_ticket() {

    return $headers;
    }
    add_filter( 'tribe_rsvp_email_headers', 'cliff_et_rsvp_bcc_admin_and_other_ticket' );
    add_filter( 'tribe_rsvp_email_headers', 'cliff_et_rsvp_bcc_admin_and_more_ticket' );
  3. @cliffordp cliffordp revised this gist Apr 21, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion functions.php
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@
    /**
    * BCC multiple email addresses, including the site admin email address, on all Event Tickets' RSVP ticket emails so they get a copy of it too
    *
    * From
    * From https://gist.github.com/cliffordp/c4fb2ea8fb5ca44973ff06e6facc9742
    * A fork of https://gist.github.com/cliffordp/4f06f95dbff364242cf54a3b5271b182
    * For https://theeventscalendar.com/support/forums/topic/event-tickets-free-not-plus-rsvp-notifications/#post-1272819
    *
  4. @cliffordp cliffordp created this gist Apr 21, 2017.
    32 changes: 32 additions & 0 deletions functions.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,32 @@
    <?php
    /**
    * BCC multiple email addresses, including the site admin email address, on all Event Tickets' RSVP ticket emails so they get a copy of it too
    *
    * From
    * A fork of https://gist.github.com/cliffordp/4f06f95dbff364242cf54a3b5271b182
    * For https://theeventscalendar.com/support/forums/topic/event-tickets-free-not-plus-rsvp-notifications/#post-1272819
    *
    * @link https://developer.wordpress.org/reference/functions/wp_mail/#comment-349
    */
    function cliff_et_rsvp_bcc_admin_and_other_ticket() {
    $bccs = array(
    get_option( 'admin_email' ), // the site admin email, probably do not want to edit this line
    '[email protected]', // edit or delete this line
    '[email protected]', // edit or delete this line, and even add another if you want
    );

    // set Headers to Event Tickets' default
    $headers = array( 'Content-type: text/html' );

    // add each BCC email if it's a valid email address
    foreach ( $bccs as $bcc ) {
    $bcc = sanitize_email( $bcc );

    if ( is_email( $bcc ) ) {
    $headers[] = sprintf( 'Bcc: %s', $bcc );
    }
    }

    return $headers;
    }
    add_filter( 'tribe_rsvp_email_headers', 'cliff_et_rsvp_bcc_admin_and_other_ticket' );