Change the sender email address for all events-ticket related emails?

Home Forums Ticket Products Event Tickets Plus Change the sender email address for all events-ticket related emails?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1291745
    Kate Guy
    Participant

    This is related to an older thread I made about this:
    https://theeventscalendar.com/support/forums/topic/change-the-sender-email-address-for-all-events-ticket-related-emails/

    I would like to change the default sender address that WooCommerce uses. For example, any ticket email would come from [email protected] (order receipt for ticket as well as RSVP).

    Using Cliff’s code from the thread linked above, I was able to get the sender address changed, but only for partially:
    1. User pays for tickets by cheque, order gets placed on-hold, email gets sent out. ** works, custom [email protected] **
    2. Admin approves from wp-admin & completes order, email gets sent out. ** doesn’t work, [email protected] **
    3. At the same time as step 2, an additional email gets sent out containing actual tickets. ** doesn’t work, [email protected] **

    Here’s the code I’m currently using:

    function cea_custom_from_email(){
    // RSVP
    add_filter(“wp_mail_from”, “cea_custom_tickets_email_from”);

    // WooCommerce
    add_filter(“woocommerce_email_from_address”, “cea_custom_tickets_email_from”);
    }

    function cea_custom_tickets_email_from(){
    // From Address
    $address = “[email protected]”;
    $address = sanitize_email($address);
    return $address;
    }

    add_action(“event_tickets_rsvp_tickets_generated”, “cea_custom_from_email”); // RSVP
    add_action(“event_tickets_woocommerce_tickets_generated”, “cea_custom_from_email”); // WooCommerce

    I’ve also tried these additional hooks with no luck:
    add_action(“event_tickets_woocommerce_tickets_generated_for_product”, “cea_custom_from_email”); // WooCommerce
    add_action(“event_tickets_woocommerce_ticket_created”, “cea_custom_from_email”); // WooCommerce

    #1292615
    Cliff
    Member

    Hi. Thanks for this detailed report.

    I’d think that if WooCommerce isn’t using its own woocommerce_email_from_address filter in the situations you described, you may want to try adding a higher priority to the filter hook or you may want to contact their support to ask why the filter isn’t taking effect.

    Please do keep me updated with your findings.

    Thank you.

    #1302948
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Change the sender email address for all events-ticket related emails?’ is closed to new replies.