Home › Forums › Ticket Products › Event Tickets Plus › Disable ticket emails?
- This topic has 10 replies, 3 voices, and was last updated 12 years, 8 months ago by
Barry.
-
AuthorPosts
-
July 19, 2013 at 1:33 pm #56149
infamia
ParticipantIs there a hook to disable sending the ticket emails?
mickey
July 22, 2013 at 9:18 am #56325infamia
ParticipantSome clarification:
I’d want to disable the ticket emails, and add the address and date/time on the order email. Any ideas?
mickeyJuly 23, 2013 at 5:50 am #56477byronclinic
ParticipantI’d be interested in this too.
July 23, 2013 at 8:08 am #56515infamia
Participant@byronclinic i think I can do this by hacking the core plugin files, but I’m hoping someone from tri.be can help clarify. There are a few obvious places in the code:
`add_action( ‘wootickets-send-tickets-email’, array( $this, ‘trigger’ ) ); `
`$this->enabled = apply_filters( ‘wootickets-tickets-email-enabled’, ‘yes’ );`See: http://docs.tri.be/Tickets:-WooCommerce/class-TribeWooTicketsEmail.html#$enabled
But I’m not sure we can set apply_filters( ‘wootickets-tickets-email-enabled’, ‘no’) in functions.php so it’s not overwritten by the line above.
mickey
July 23, 2013 at 8:42 am #56529Barry
MemberYou could certainly change the state of the enabled property to a value other than yes using a filter:
add_filter('wootickets-tickets-email-enabled', 'disable_wootickets_emails');
function disable_wootickets_emails() { return 'OFF'; }July 23, 2013 at 9:56 am #56558infamia
ParticipantThanks, @Barry, I’ll give it a shot. Any easy way of including event time on the order email?
July 24, 2013 at 10:43 am #56887Barry
MemberI would imagine so, however I’m afraid that sort of customization isn’t something we can help with right now.
Essentially though you would override the customer-completed-order.php template and check if any of the ordered items were tickets – and extract the details that way.
Whether you display the event date/time beside each line item (assuming you want to cover cases such as tickets for more than one event being ordered at once) or somewhere else would be something to consider.
Or you could just add a further note about an email with tickets also being sent (which does of course include dates and times).
July 28, 2013 at 1:29 pm #57494infamia
ParticipantHi Barry
I added the code to functions.php and it doesn’t seem to have an effect on sending ticket emails. Any thoughts?
mickey
July 29, 2013 at 1:32 pm #57606Barry
MemberDoes the approach outlined in the following thread work for you?
July 29, 2013 at 6:02 pm #57682infamia
ParticipantBarry, I’ll follow up there.
July 29, 2013 at 8:04 pm #57695Barry
MemberGreat!
-
AuthorPosts
- The topic ‘Disable ticket emails?’ is closed to new replies.
