Disable ticket emails?

Home Forums Ticket Products Event Tickets Plus Disable ticket emails?

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #56149
    infamia
    Participant

    Is there a hook to disable sending the ticket emails?

    mickey

    #56325
    infamia
    Participant

    Some clarification:
    I’d want to disable the ticket emails, and add the address and date/time on the order email. Any ideas?
    mickey

    #56477
    byronclinic
    Participant

    I’d be interested in this too.

    #56515
    infamia
    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

    #56529
    Barry
    Member

    You 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'; }

    #56558
    infamia
    Participant

    Thanks, @Barry, I’ll give it a shot. Any easy way of including event time on the order email?

    #56887
    Barry
    Member

    I 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).

    #57494
    infamia
    Participant

    Hi Barry

    I added the code to functions.php and it doesn’t seem to have an effect on sending ticket emails. Any thoughts?

    mickey

    #57606
    Barry
    Member

    Does the approach outlined in the following thread work for you?

    Remove tickets email

    #57682
    infamia
    Participant

    Barry, I’ll follow up there.

    #57695
    Barry
    Member

    Great!

Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘Disable ticket emails?’ is closed to new replies.