How to Automatically mark WooCommerce orders “Complete” on receipt of payment

Ever wanted your WooCommerce orders to be marked as “complete” straight away – for example if you never need them to be marked “processing” (maybe they are downloads, or a membership, or some other reason which means “processing” is not helpful to you, for example!?)?

The snippet below in this page will get you there. Its designed to make sure a WooCommerce order goes straight to Complete on the customer reaching the thank-you page – i.e. when their payment has successfully completed in WooCommerce.

Remember you can disable processing mail, too

Please note, it is still worth visiting WooCommerce > Settings > Emails and disabling the “Processing” email, as this may still be triggered, resulting in a double mail. If you’re not using the “processing” status, then turning off the mail is a good idea, as you simply don’t need it ever to fire.

The code snippet

The code snippet below should be placed into your child theme’s functions.php file, placed into a snippets plugin, or a custom plugin:



Let us know if this works for you!

Leave a comment below if this worked for you – or if you encountered any issues making this work – and help the Open Source community to learn from each other’s experiences, too.

5 thoughts on “How to Automatically mark WooCommerce orders “Complete” on receipt of payment”

  1. Is there a way of doing this except for BACS paid orders, so for example PayPal and Stripe orders go straight to Completed but not BACS?

    Reply
  2. Hello Robin,

    There is an issue with the idea.
    Some payment gateways use woocommerce_thankyou hook to throw up “Payment Failed” messages.
    Thus, there is a risk of orders being marked as “Completed” even when the payment has failed. This has happened to some of the orders on my store.
    Do you have a solution to the issue?

    Thanks,
    Manju

    Reply

Leave a comment

No links of any kind allowed in comments - if you add any links, your comment will automatically be deleted.