Hi Stephen and Joe,
Just to let you know I have finally got the attachment working. Now a pdf file is attached to the booking confirmation/ticket.
I had been using the wrong absolute path before.
It’s just as Joe indicated to me, what I thought was the absolute path turned out not to be.
With some php I found the full path to my file.
Thanks to you both for the help and support, I’m pleased it’s working now.
Regards,
Tony
Tony
Glad to hear you got it sorted Tony!
Joe Fairlamb
Hi Tony,
If you know the file path relative to the wp-content directory you could use WP_CONTENT_DIR . '/relative/path/to/file.pdf'
.
ABSPATH
will give you the absolute path to the directory WordPress is installed (with a trailing slash).
Where are you storing the file? You said in a directory aa
in the “root”. Root of what exactly?
Stephen Harris
Hello Stephen,
Would it be possible to add the same attachment filter to the eventorganiser_notify_new_booking function in booking-actions.php. We have a legal inscription form which needs to be signed by attendees for assurancee purposes and brought to the event and signed by hand. And we would like to attach it to the first email because many participants make a bank transfer and the confirmation is only on the day itself.
Many Thanks
Philippine
Maude Picalausa
Hello again Stephan,
I realised that there is an error in my question.The procedure that I’d like to hook into is in _eo_process_booking_submission(), in the case ‘offline’:
Maude Picalausa
Hi Philippine,
A filter won’t be added until a later version (post 2.0.0); for the time being I’d recommend editing the codebase or alternatively you could hook into eventorganiser_pre_gateway_booking_offline
and send an email from that callback.
Stephen Harris