Only some orders automatically marked as complete

Home Forums Ticket Products Event Tickets Plus Only some orders automatically marked as complete

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1152020
    Jackie
    Participant

    Hello,

    I am having an odd situation where some ticket orders are being automatically marked as complete and others are not. I am using the WooCommerce auto-complete function in functions.php, and I have selected “Try to set the status of new ticket orders to “complete” automatically” in the ticket settings. Of the last 11 orders, 4 have been marked complete and 7 have not. The pending orders are not consecutive, there are completed orders mixed in with pending orders.

    This is happening for multiple events, so the problem is not with a specific event. Everyone has successfully paid via PayPal, and the stock has been reduced for all orders. I cannot find any obvious difference between the completed orders and pending orders.

    Do you have any ideas how to resolve this issue?

    Thanks,
    Celeste

    #1152323
    Andras
    Keymaster

    Hello Celeste and welcome to our forums,

    I’m sorry you are experiencing a problem, let me try to help you with that.

    As a first, could you share with me the auto-complete function you have in your functions.php?

    My hunch is that the function you have and the setting in Event Tickets Plus might be colliding. You don’t really need both. You could experiment with having only one running, either the setting in ET+ or the function, but not both.

    Cheers,
    Andras

    #1152570
    Jackie
    Participant

    Hi Andras, I am using this function:

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

    I’ll try removing this and using the checkbox in the plugin and see what happens.

    Thanks!
    Celeste

    #1152816
    Andras
    Keymaster

    Thanks for sharing that! It seems to be OK, but definitely worth checking what happens without it, as the plugin setting should just do that. So this would be a duplicate.

    Please let me know how the test works out.

    Cheers,
    Andras

    #1154805
    Jackie
    Participant

    Hi Andras,

    My problem is still happening. These are the steps I’ve taken:

    1. I removed the function and left the checkbox set to autocomplete orders in the tickets settings. That did not work, and orders were left as pending.

    2. I unchecked the ticket settings autocomplete box and added the Woo function back into functions.php. I just checked and three orders have come in, all pending.

    So it appears neither the function nor the checkbox is working! Any other ideas how to get the orders to auto-complete?

    Thanks for help.

    #1155002
    Andras
    Keymaster

    Hi Jackie,

    I was looking around and testing a bit. Here’s what I found.

    When I used the Event Ticket Plus setting and bank transfer as gateway, then it didn’t work. That has a reason as if the order is done with bank transfer of check payment then it will not get automatically completed. Obviously, in these cases you didn’t get the money yet, so why would you give out the ticket.

    When I used the code which you sent (actually I copied it from here, then the order was marked completed, even when I used bank transfer.

    What payment gateway are you using? Does it have a setting where you can set what the order status should be if the payment is successful?

    Let me know and we take it from there.

    Cheers,
    Andras

    #1157031
    Jackie
    Participant

    Hi Andras, we are using PayPal for payments. I double checked all the PayPal settings and everything looks normal. The payments go through and ticket stock is reduced, but the order doesn’t get switched to complete.

    I am attaching two screenshots of the order notes for recent ticket orders. One of them did not auto-complete and I manually completed it this morning. The other, from a couple weeks ago, auto-completed at the same time the payment went through. Periodically an order will auto-complete, which makes this even more strange!

    Thanks.

    #1157266
    Andras
    Keymaster

    Hello Jackie,

    I’m sorry you are still having an issue with this.

    I have found that this was a bug some months back. Unfortunately nobody from our team was able to replicate it, so a fix couldn’t be developed.

    Meanwhile some updates have shipped, both WordPress and our plugins. Did you run an update and are you still experiencing this?

    Note: before updating it is highly recommended to do a full site backup, just in case and possibly test the update on a development server. Especially with updating WordPress to 4.6 as lot of people have ran into the problem that the site wasn’t sending out emails after the update.

    Please check this.

    Does this also happen when you are selling other WooCommerce products? Would it be possible to test this somehow?

    Cheers,
    Andras

    #1158783
    Jackie
    Participant

    Hi Andras,

    I have been monitoring this issue and running some tests. We don’t normally sell non-ticket products, but I set up a test product, placed a few orders while logged in and as a guest, and all orders autocompleted.

    The last couple of ticket orders we received have also autocompleted. I still can’t see any discernible pattern on why some complete and others do not.

    Everything is up to date including WP 4.6.

    Unless you can think of any other way to fix this, we’ll leave it alone for now. There is a plugin called “WooCommerce Autocomplete Orders” – I may try that if the issue persists.

    Thanks for all your help!

    #1158992
    Andras
    Keymaster

    Hi Jackie,

    I’m sorry we haven’t been able to find the source of this issue yet, but I’m glad to hear it’s been working recently well.

    I don’t know that plugin (yet 🙂 ) give it a try, maybe that will eliminate this issue.

    I’m going to close this thread for now. In case you discover that the issue persists, then we might be having a serious bug. In this case please open a new thread and reference this one, so we have as much information as possible. Thanks!

    And of course, if you have any other questions or issues, the forums and our support team are waiting for you! 🙂

    Cheers,
    Andras

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Only some orders automatically marked as complete’ is closed to new replies.