Nicola Mustone

Happiness Lead @ Automattic



How make “Processing” orders editable

WooCommerce has different order statuses that you can use to handle your workflow.

They are:

  • On Hold – The order is waiting for something, like a BACS payment.
  • Pending Payment – The order is waiting for the payment from an online payment gateway.
  • Processing – The order has been paid for and the admin is processing it.
  • Completed – The order has been shipped and completed.
  • Cancelled – The order has been cancelled by the customer or by the system for some reason.
  • Refunded – The order has been completely refunded. This is not used for partial refunds.
  • Failed – The order payment failed.

You can edit orders only when their status is On hold or Pending Payment. This is because the customer still needs to pay for that order, so it makes sense to accept changes for it.
Nobody would be happy to see their total amout changed after they paid.

But for any reason, you may need to allow Processing orders (in example) to be editable. How to do this?

Said. Done. Open your functions.php file located in wp-content/themes/your-theme-name/ and add this code at the end of the file:

View this gist on GitHub

This code checks the current order status. If it’s processing , it will be editable.

You can allow more order statuses to be editable copying the code from line 3 to 5 then pasting it just before line 7 and changing the order status in the if .


Subscribe to This Blog

Receive new articles from this blog directly in your inbox! No spam guaranteed!

Join 673 other subscribers

42 responses to “How make “Processing” orders editable”

  1. How can I change this for pending payment ALONGSIDE the processing title?

  2. Edit "Processing" Orders in WooCommerce – Website Psychiatrist

    […] to Nicola Mustone’s article How make “Processing” orders editable, it’s as simple as adding this code to your theme’s […]

  3. The code is working on my site for the processing status but not for a custom status I created. Am I doing something wrong? I copied the if statement and substituted my custom status but nothing. Any ideas?

Leave a Reply

You Might Also Like These Articles


Contribute to Improving This Blog

Did you enjoy this article? Was it helpful? Contribute to help me write more articles! The funds collected from this blog are reinvested directly into improving my skills or the blog so that I can provide more and better content!

One-Time
Monthly
Yearly

Make a one-time donation

Make a monthly donation

Make a yearly donation

Choose an amount

€1.00
€5.00
€10.00
€5.00
€15.00
€100.00
€5.00
€15.00
€100.00

Or enter a custom amount


Your contribution is appreciated.

Your contribution is appreciated.

Your contribution is appreciated.

DonateDonate monthlyDonate yearly

Don't Miss a Thing!

Receive new articles from this blog directly in your inbox!

No spam guaranteed!

Join 673 other subscribers

Continue Reading

Discover more from Nicola Mustone

Subscribe now to keep reading and get access to the full archive.

Continue reading