How to generate tickets again after the check in (function)?
Thanks for your answer. I am mainly looking for a function that i could resend the tickets. Because we have a solution for generating the tickets again after they have been checked in and received our custom label. So our pdf ticket has the checked in label. We just do not know how to send the tickets for the customer.
So if we really simplify this. What is the function to send the tickets to the customer, or action or hook? How can we trigger the action of sending the tickets to the customer.
And totally another thing. We previously had another discussion of styling the pdf. I have 100% perfect now. I wanted to let you know that if there is a space in the styling (inline) it will cause many problems to the styling of the pdf.
h6 style=”margin:0 0 10px 0″>
THIS WILL cause almost all styling to break in the pdf.
h6 style=”margin:0 0 10px 0″>
Notice the break after first ”
Out of the topic, but wanted you to know.
If using WooCommerce tickets, you can resend a ticket email by going to the order and choosing that order action. Here’s a quick video (no audio): https://cl.ly/0x0K3j2F1U2m
Thanks for the heads up here. Where are you adding such CSS?
You could report this issue to https://github.com/mpdf/mpdf/issues if it’s reproducible.
Thanks for your answer. Yes i know that this actions exists in the orders in woocommerce and it has proven to be very useful also. But we are looking the exact same function, but we need to rigger this automatically. So what is the function to trigger this action (of sending the tickets to the customer email)?
As we have loads of tickets send daily to the customer we can not go through all the events and look for the order and make it manually, we need to have it automatically. I know you have this function as it is working fine, but the problem is we do not know it. 🙂
This all happens by extending WooCommerce’s email class and then this class gets added via the woocommerce_email_classes filter.
For more details, you can search /wp-content/plugins/event-tickets-plus/src/Tribe/Commerce/WooCommerce/Main.php for “add_email_class_to_woocommerce” and also review /wp-content/plugins/event-tickets-plus/src/Tribe/Commerce/WooCommerce/Email.php
I’m unsure how/where you could add all this as a button to loop through all attendees, though.
I try to make it as clear as possible:
How to call this from a hook or from our own plugin.
Although untested, one or both of these might work:
- Tribe__Extension::instance( ‘Tribe__Extension__PDF_Tickets’ )->do_upload_pdf( /*…args…*/ );
- Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance()->send_tickets_email( /*…args…*/ );
That being said, if you successfully send a new email, I believe it would send the existing PDF file and not generate a new one with your added customized styling/watermark image.
Therefore, I’ve logged a feature request for the PDF Tickets extension to be able to force-overwriting the existing PDF.
Thanks for your answer. It was showing us the right way.
We are doing some stuff before, but this will do the trick for us.
Tribe__Extension::instance( ‘Tribe__Extension__PDF_Tickets’ )->do_upload_pdf( $attendee_id );
$order_ref = get_post_meta($attendee_id,‘_tribe_wooticket_order’,true);
Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance()->send_tickets_email( $order_ref );
The topic ‘How to generate tickets again after the check in (function)?’ is closed to new replies.