Ticket as an attachment

Home Forums Ticket Products Event Tickets Plus Ticket as an attachment

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #735042
    Mariano Aran
    Participant

    Hello,

    I’m hoping you can help me. I have been able to create the ticket as a PDF but I am having trouble attaching it to the email it is sent.

    As you did this in past versions of this plugin, I was wondering if you would be able to give me a pointer on how can this be done?

    To clarify, I can produce the PDF, but I can’t seem to find a way to attach it to the email.

    I appreciate any help you can give me.

    Thanks!

    #735451
    Barry
    Member

    Hi marianoaran,

    Right now we’re building on top of the WC_Email class (a part of WooCommerce) to send tickets – and this ultimately dispatches emails using WordPress’s own wp_mail() functionality.

    So that opens a few opportunities for including attachments, but one way you might be interested in is making use of the following filter hook which lives within WC_Email:

    woocommerce_email_attachments

    From there you should be able to do what you need 🙂

    Good luck!

    #735646
    Mariano Aran
    Participant

    Can you tell me other ways to do that?

    Thanks!

    #735783
    Barry
    Member

    Well, a possibly less ideal approach could be to use the wp_mail filter itself. If neither that or the first approach works you might even unhook our own mailer which is done using the woocommerce_email_classes hook.

    For customizations like this, though, we really need to leave things in your hands 🙂

    With that in mind I’ll go ahead and close this thread – but if we can help with any other issues please do feel free to create new threads as needed and one of the team will be happy to help.

    Thanks!

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Ticket as an attachment’ is closed to new replies.