Home › Forums › Ticket Products › Event Tickets Plus › Ticket as an attachment
- This topic has 3 replies, 2 voices, and was last updated 9 years, 7 months ago by Barry.
-
AuthorPosts
-
September 10, 2014 at 4:47 am #735042Mariano AranParticipant
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!
September 10, 2014 at 8:10 am #735451BarryMemberHi 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!
September 10, 2014 at 9:14 am #735646Mariano AranParticipantCan you tell me other ways to do that?
Thanks!
September 10, 2014 at 10:12 am #735783BarryMemberWell, 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!
-
AuthorPosts
- The topic ‘Ticket as an attachment’ is closed to new replies.