Send ticket on payment complete – mixed cart

Home Forums Ticket Products Event Tickets Plus Send ticket on payment complete – mixed cart

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1150912
    Ingo Storl
    Participant

    Hi there,

    I know this topic has been discussed a lot already, however my issue cannot be fixed by adding the “auto complete orders” plugin or code snippet.

    This is due to the fact that we also sell other products not just virtual or digital products, which means if a customer has a mixed cart with, let’s say, books and a ticket. Automatically completing this order is not correct even though the payment might have been received already. The order is only completed once the book has been sent out and the order properly processed.

    But I need for the ticket to be sent out after payment is received and for the rest of the order to still be in process but not completed. How can this be done? I am aware that you only provide limited customization support, but I really would need this to be managed somehow.

    Thanks for your help in advance!

    Regards
    Ingo

    #1151103
    Brook
    Participant

    Howdy Ingo,

    I would love to help you with this.

    This should be manually possible right now. When payment is received go to the order, click Actions > Resend Order Emails > Tickets.  It will say “resend” regardless of whether it was sent or not. And there you go, customer has their tickets, order status has not changed, and you can move it to complete once you fulfill the rest of the order.

    You could make that happen automatically with a little code too. It’s most on the WooCommerce side. You will just need to tap into one of their hooks that runs when an order is charged. Now check to see if that order contains tickets, if it does run:

    do_action( 'wootickets-send-tickets-email', $order_id );

    And the tickets email will get sent out.

    Does that all make sense? Does that answer your questions? Please let me know.

    Cheers!

    – Brook

    #1152029
    Ingo Storl
    Participant

    Hi Brook, thanks for your reply.

    I am no programer so this is probably gonna be really tricky for me or simply impossible, seeing that I would like to go for the automatic option. I mean, adding snippets to the functions.php – that I can do and maybe a bit more than that too 🙂

    If you could maybe be more specific: WooCommerce side – which files are you referring to?
    One of their hooks – which one?

    Could you explain the process of implementing the code a bit further? I am willing to study up on how to use hooks and would try and get this sorted with your help – if that’s possible, with your limited customization support and all…

    Thanks Brook, looking forward to hearing from you

    Regards
    Ingo

    • This reply was modified 9 years, 8 months ago by Ingo Storl.
    #1152447
    Brook
    Participant

    Howdy Ingo,

    I’d definitely love to help you as much as I can. Ordinarily it is up to you to write this code, but I can probably convince the higher ups to make an exception. I’ll get back to you tomorrow, hopefully with a little more research for you under my belt and some more specific instructions.

    ’til then.

    – Brook

    #1152478
    Ingo Storl
    Participant

    Thank you so much Brook!!

    #1153515
    Ingo Storl
    Participant

    Hi Brook, I haven’t heard back from you yet.

    Have you managed to get some more insight on how to resolve my issue? Would really appreciate your help on this matter. Thanks again in advance for your efforts.

    Regards
    Ingo

    #1154829
    Brook
    Participant

    Howdy Ingo,

    I am sorry it took me a bit to get back to you. I was not able to get much buyoff on this, their thinking was that this is an edge case that not a lot of people are facing.

    However I do think I found a simple way of doing this. I have not had a chance to test it yet, but inserting this in your theme’s functions.php would likely do the trick:

    function tribe_woocommerce_payment_complete_send_email( $order_id ) {
       do_action( 'wootickets-send-tickets-email', $order_id );
    }
    add_action( 'woocommerce_payment_complete', 'tribe_woocommerce_payment_complete_send_email' );

    Does it?

    Cheers!

    – Brook

    #1155261
    Ingo Storl
    Participant

    Hi Brook, thanks for getting back to me.

    I have added the code to my functions.php and it’s working beautifully so far.

    Thanks again, you’re a star!

    Best regards
    Ingo

    #1155669
    Brook
    Participant

    You are very welcome Ingo! I am so happy that worked. Thank you for getting back!

    – Brook

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Send ticket on payment complete – mixed cart’ is closed to new replies.