order complete after paypal payment

Home Forums Ticket Products Event Tickets Plus order complete after paypal payment

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1109016
    Riccardo
    Participant

    Hi,
    I try to set “Try to set the status of new ticket orders to “complete” automatically” but it doesn’t work.
    So How can I enable this?
    thanks

    #1109020
    Hunter
    Moderator

    Hey Riccardo,

    Welcome back and happy Friday! Check out this article and please let me know if it helps setting the order as complete upon checkout. Thanks for choosing PRO and enjoy your weekend 🙂

    #1109158
    Riccardo
    Participant

    Hi,
    thanks Hunter.
    I try to add this with the plugin “WooCommerce – Autocomplete Orders”.
    now in the events ticket plus I don’t have flag “Try to set the status of new ticket orders to “complete” automatically” but I add the code to the functions.php

    /**
     * Auto Complete all WooCommerce orders.
     */
    add_action( 'woocommerce_thankyou', 'custom_woocommerce_auto_complete_order' );
    function custom_woocommerce_auto_complete_order( $order_id ) { 
        if ( ! $order_id ) {
            return;
        }
    
        $order = wc_get_order( $order_id );
        $order->update_status( 'completed' );
    }

    And now it works.
    Is it the right mode or I have to flag “Try to set the status of new ticket orders to “complete” automatically” in the ticket options?
    thanks

    #1109160
    Riccardo
    Participant

    Hi,
    I have a problem.
    If I add your code, I have to return to my site to complete order.
    If I use the other plugin I don’t have to return.
    what is the best solution?
    thanks

    #1109577
    Hunter
    Moderator

    Hey Riccardo,

    Whichever solution you think fits best for you is what I would recommend. Regardless, I’m glad to hear you’re headed in the right direction 🙂

    If you feel this issue is “resolved” – please mark it as such and I’ll close it out. Thanks for the update and have a good week.

    #1109612
    Riccardo
    Participant

    Thanks Hunter!

    #1109975
    Hunter
    Moderator

    No problem, glad to be of assistance! Thanks again for choosing PRO and feel free to open a new thread if you have any more questions 🙂

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘order complete after paypal payment’ is closed to new replies.