{"id":1291745,"date":"2017-06-01T07:34:19","date_gmt":"2017-06-01T14:34:19","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/change-the-sender-email-address-for-all-events-ticket-related-emails-2\/"},"modified":"2017-06-02T14:35:55","modified_gmt":"2017-06-02T21:35:55","slug":"change-the-sender-email-address-for-all-events-ticket-related-emails-2","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/change-the-sender-email-address-for-all-events-ticket-related-emails-2\/","title":{"rendered":"Change the sender email address for all events-ticket related emails?"},"content":{"rendered":"<p>This is related to an older thread I made about this:<\/p>\n<blockquote class=\"wp-embedded-content\" data-secret=\"gRky18j9Sg\"><p><a href=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/change-the-sender-email-address-for-all-events-ticket-related-emails\/\">Change the sender email address for all events-ticket related emails?<\/a><\/p><\/blockquote>\n<p><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;Change the sender email address for all events-ticket related emails?&#8221; &#8212; \" src=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/change-the-sender-email-address-for-all-events-ticket-related-emails\/embed\/#?secret=x9Oetpxqnu#?secret=gRky18j9Sg\" data-secret=\"gRky18j9Sg\" width=\"580\" height=\"327\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n<p>I would like to change the default sender address that WooCommerce uses. For example, any ticket email would come from events@domain.com (order receipt for ticket as well as RSVP).<\/p>\n<p>Using Cliff&#8217;s code from the thread linked above, I was able to get the sender address changed, but only for partially:<br \/>\n1. User pays for tickets by cheque, order gets placed on-hold, email gets sent out. ** works, custom events@domain.com **<br \/>\n2. Admin approves from wp-admin &amp; completes order, email gets sent out. ** doesn&#8217;t work, woocommerce@domain.com **<br \/>\n3. At the same time as step 2, an additional email gets sent out containing actual tickets. ** doesn&#8217;t work, woocommerce@domain.com **<\/p>\n<p>Here&#8217;s the code I&#8217;m currently using:<\/p>\n<p>function cea_custom_from_email(){<br \/>\n\/\/ RSVP<br \/>\nadd_filter(&#8220;wp_mail_from&#8221;, &#8220;cea_custom_tickets_email_from&#8221;);<\/p>\n<p>\/\/ WooCommerce<br \/>\nadd_filter(&#8220;woocommerce_email_from_address&#8221;, &#8220;cea_custom_tickets_email_from&#8221;);<br \/>\n}<\/p>\n<p>function cea_custom_tickets_email_from(){<br \/>\n\/\/ From Address<br \/>\n$address = &#8220;events@edcan.ca&#8221;;<br \/>\n$address = sanitize_email($address);<br \/>\nreturn $address;<br \/>\n}<\/p>\n<p>add_action(&#8220;event_tickets_rsvp_tickets_generated&#8221;, &#8220;cea_custom_from_email&#8221;); \/\/ RSVP<br \/>\nadd_action(&#8220;event_tickets_woocommerce_tickets_generated&#8221;, &#8220;cea_custom_from_email&#8221;); \/\/ WooCommerce<\/p>\n<p>I&#8217;ve also tried these additional hooks with no luck:<br \/>\nadd_action(&#8220;event_tickets_woocommerce_tickets_generated_for_product&#8221;, &#8220;cea_custom_from_email&#8221;); \/\/ WooCommerce<br \/>\nadd_action(&#8220;event_tickets_woocommerce_ticket_created&#8221;, &#8220;cea_custom_from_email&#8221;); \/\/ WooCommerce<\/p>\n","protected":false},"template":"","class_list":["post-1291745","topic","type-topic","status-closed","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Change the sender email address for all events-ticket related emails? -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/change-the-sender-email-address-for-all-events-ticket-related-emails-2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Change the sender email address for all events-ticket related emails? -\" \/>\n<meta property=\"og:description\" content=\"This is related to an older thread I made about this: 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 events@domain.com (order receipt for ticket as well as RSVP). Using Cliff&#8217;s code from the [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/change-the-sender-email-address-for-all-events-ticket-related-emails-2\/\" \/>\n<meta property=\"article:modified_time\" content=\"2017-06-02T21:35:55+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/change-the-sender-email-address-for-all-events-ticket-related-emails-2\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/change-the-sender-email-address-for-all-events-ticket-related-emails-2\/\",\"name\":\"Change the sender email address for all events-ticket related emails? -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2017-06-01T14:34:19+00:00\",\"dateModified\":\"2017-06-02T21:35:55+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/change-the-sender-email-address-for-all-events-ticket-related-emails-2\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/change-the-sender-email-address-for-all-events-ticket-related-emails-2\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/change-the-sender-email-address-for-all-events-ticket-related-emails-2\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/theeventscalendar.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Topics\",\"item\":\"https:\/\/theeventscalendar.com\/support\/topics\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Ticket Products\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/event-tickets\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Event Tickets Plus\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/event-tickets\/event-tickets-plus\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Change the sender email address for all events-ticket related emails?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\",\"url\":\"https:\/\/theeventscalendar.com\/support\/\",\"name\":\"\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Change the sender email address for all events-ticket related emails? -","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/change-the-sender-email-address-for-all-events-ticket-related-emails-2\/","og_locale":"en_US","og_type":"article","og_title":"Change the sender email address for all events-ticket related emails? -","og_description":"This is related to an older thread I made about this: 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 events@domain.com (order receipt for ticket as well as RSVP). Using Cliff&#8217;s code from the [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/change-the-sender-email-address-for-all-events-ticket-related-emails-2\/","article_modified_time":"2017-06-02T21:35:55+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/change-the-sender-email-address-for-all-events-ticket-related-emails-2\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/change-the-sender-email-address-for-all-events-ticket-related-emails-2\/","name":"Change the sender email address for all events-ticket related emails? -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2017-06-01T14:34:19+00:00","dateModified":"2017-06-02T21:35:55+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/change-the-sender-email-address-for-all-events-ticket-related-emails-2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/change-the-sender-email-address-for-all-events-ticket-related-emails-2\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/change-the-sender-email-address-for-all-events-ticket-related-emails-2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/theeventscalendar.com\/support\/"},{"@type":"ListItem","position":2,"name":"Topics","item":"https:\/\/theeventscalendar.com\/support\/topics\/"},{"@type":"ListItem","position":3,"name":"Ticket Products","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/event-tickets\/"},{"@type":"ListItem","position":4,"name":"Event Tickets Plus","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/event-tickets\/event-tickets-plus\/"},{"@type":"ListItem","position":5,"name":"Change the sender email address for all events-ticket related emails?"}]},{"@type":"WebSite","@id":"https:\/\/theeventscalendar.com\/support\/#website","url":"https:\/\/theeventscalendar.com\/support\/","name":"","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1291745","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":1,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1291745\/revisions"}],"predecessor-version":[{"id":1292616,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1291745\/revisions\/1292616"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1291745"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}