Automatic Order Processing

Home Forums Ticket Products Event Tickets Plus Automatic Order Processing

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #32019
    Thomas Bliss
    Participant

    I saw the tutorial about order processing, but something didn’t work quite right or Im not configuring it correctly. If I have a free event, shouldn’t the order automatically complete?

    Thank you for your response.

    #32050
    Barry
    Member

    Is this in relation to WooTickets?

    #32053
    Thomas Bliss
    Participant

    Yes Sorry.. in relation to WooTickets.

    #32055
    Barry
    Member

    OK, just moving this across to our WooTickets forum and I’ll take a look at this.

    #32060
    ricardpanades
    Participant

    Hi “Stranger” XD

    Here is the solution that i found after a little hours for me and it will work for you now 😀 :

    // ——— Autocomplete ——–
    function mysite_hold($order_id) {
    $order = new WC_Order( $order_id );
    $order->update_status( ‘completed’ );
    }
    function mystie_processing($order_id) {
    $order = new WC_Order( $order_id );
    $order->update_status( ‘completed’ );
    }
    add_action( ‘woocommerce_order_status_on-hold’, ‘mysite_hold’);
    add_action( ‘woocommerce_order_status_processing’, ‘mysite_processing’);

    Only copy and paste this code on you functions.php and all the orders will autocomplete and send the tickets.

    I do it with my current project (hhtp://ilcircoitaliano.com) and works very well.

    #32065
    Barry
    Member

    Does Ricard’s solution work for you Thomas?

    #32066
    Thomas Bliss
    Participant

    Im not sure… I’ll have to send this over to someone that knows how to implement this code. Its beyond my knowledge.

    #32073
    Barry
    Member

    OK. I think the rationale for this is that, if the ticket were physically shipped, you would still need to mark the order complete manually.

    With that in mind (as discussed here and elsewhere) you could also try editing the product (in the WooCommerce product editor) and marking it as virtual and downloadable.

    It then ought to automatically complete.

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Automatic Order Processing’ is closed to new replies.