Help Desk

How to generate tickets again after the check in (function)?

  • Posts: 124 Topics: 43
    | Permalink

    Hi,

    We have a situation that we would like to generate the tickets again after the check in is made. This is because we have customised the tickets that they will get a checked in label. This will lead to a situation that we would like to resend the newly generated tickets to the customer. For example: You have checked in here is your new tickets.

    So best option would be to know if there is a function to generate the tickets again. I am talking also about the PDF ticket.

    Or is there a hook, action or function to resend it as fresh tickets. Like they never existed before…

    thanks

    Posts: 11161
    | Permalink

    Hi. Are you saying that a new email with the PDF ticket is attached, but the PDF ticket does not have the “Checked In” label on it because the ticket.pdf file already existed but it was the old one without the “Checked In” label?

    Posts: 124 Topics: 43
    | Permalink

    Hi,

    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.

    Thanks

    Posts: 124 Topics: 43
    | Permalink

    Hi,

    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.

    For example:
    CORRECT

    <

    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.

    thanks.

    Posts: 124 Topics: 43
    | Permalink

    Hi,

    I noticed that it will not display html in this board correctly, maybe blocked. Here is an image for you.

    Thanks.

    Posts: 11161
    | Permalink

    1)

    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

    2)

    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.

    Posts: 124 Topics: 43
    | Permalink

    Hi,

    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. 🙂

    Thanks.

    Posts: 11161
    | Permalink

    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.

    Posts: 124 Topics: 43
    | Permalink

    Hi,

    I try to make it as clear as possible:

    https://github.com/moderntribe/products-extensions/blob/master/tribe-ext-pdf-tickets/index.php#L537-L545

    How to call this from a hook or from our own plugin.

    Thanks.

    Posts: 11161
    | Permalink

    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.

    Posts: 124 Topics: 43
    | Permalink

    Hi,

    I will try it. And let you know.

    Thanks.

    Posts: 11161
    | Permalink

    Thanks for checking in. I’ll wait to hear from you.

    Please note that threads get Closed automatically after a couple weeks of inactivity. If it does get Closed, please open a new thread, adding your current problem description and also linking back to this thread.

    Thank you!

    Posts: 124 Topics: 43
    | Permalink

    Hi,

    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 );

    Thanks.

    Posts: 124 Topics: 43
    | Permalink

    So, this case is solved. Great work.

    ilkka

    | Permalink
    Posts: 11161
    | Permalink

    Glad to hear and thanks for letting us know.

    Posts: 11161
    | Permalink

    Again (just like at https://theeventscalendar.com/support/forums/topic/pdf-tickets-extension-problems/), I’m notifying you that we’ve published an update to PDF Tickets at https://theeventscalendar.com/extensions/pdf-tickets/

    Please open a new ticket if you need additional support on this or another issue regarding PDF Tickets.

The topic ‘How to generate tickets again after the check in (function)?’ is closed to new replies.