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:

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 to5 then pasting it just before line7 and changing the order status in the if .

31 replies
  1. haris8
    haris8 says:

    We understand that it’s not just about the financial transaction – it’s about your company’s reputation on the line. That’s why PayCanada is diligent about safeguarding your merchant service account and the POS payment processing.

    Reply
  2. sleepymonk
    sleepymonk says:

    We are often faced with small changes and would love to edit an existing order.

    We had an order today for an item which we no longer sell. We were able to get the customer to substitute for a lower priced item, but we needed to edit their existing order.

    To do this and also process a partial refund with the same order, we did the following:

    add the new lower priced item to the order
    change the lower priced item’s price to the higher price
    delete the higher priced item (the one you are replacing)
    calculate the taxes
    calculate the total
    do a partial refund by editing the price and tax of the new item
    print the change off for your accountant (me, in my case)

    We don’t track inventory in woocommerce, so that wasn’t a worry here.

    Simple. Thank you! We tested it first before going live, but it worked great the first time so we had no problem copying the code to our live site.

    Thank you, Nicola! We don’t always need the snippets you provide, but we always enjoy the work you do!

    Reply
  3. Mike haney
    Mike haney says:

    We also need a way to be able to edit existing orders. It is not uncommon for a customer to call and want to add something to there order after the order is placed. We have no way to edit existing orders.

    Reply
    • Nicola Mustone
      Nicola Mustone says:

      Hi Mike,
      You can change this code:

      if ( $order->get_status() == 'processing' ) {
      

      to this:

      if ( $order->get_status() == 'processing' || $order->get_status() == 'completed'  ) {
      

      To allow also Completed orders to be edited.
      Also, you can always switch the order status to On Hold, make your changes, and then save it back with the previous status.

      Reply
  4. Camila
    Camila says:

    This may be a silly question but I would like to know how the payment works here? I mean, I have a processing order which means my client already paid for the product but I have to charge him an extra fee due he wants to exchange the product so he has to pay for the new shipping….if I edit his order…the extra price will automatically be charged? and if not…how can I do it?

    Reply
    • Daz
      Daz says:

      Im wondering the same thing.

      In the past ive used a bespoke system that allowed for this

      customer buys Product A for $10 and completes order through Payment gateway. Order #1001
      customer rings up and say, “oops, i need product B for $10 also”
      In admin I edit #1001 to add Product B.
      Order #1001 now shows and amount outstanding of $10
      Order #1001 can be resent to the payment gateway to add the extra $10 via credit card.
      the order is complete again.

      Fairly common workflow for most online business.

      Reply
  5. Nikki
    Nikki says:

    Hi,

    is there a way to allow customer to edit their own order? I’m not conducting financial transactions, it’s more like a “rental” request, so I would like the ability for a client to edit their own request. So when they are in”My Account”, Orders, they can change destination address, and quantity of items.

    Thank you so much!

    Reply
  6. Rajiv Bajaj
    Rajiv Bajaj says:

    Hi. I was wondering if you could guide me with a slightly different issue. I am testing a WooCommerce site using WooCommerce-Bookings plugin and the Accommodations plugin for booking hotels and tours online. This site will only be accessible to customers who are on our credit list and will not be making individual payments.

    I am using the Auto-Complete Orders option, with Check Payments as the default payment gateway, and bookings are working fine.

    However, In the invoice email generated to customer, the status is “Paid”. Same is the case in My Account, when I click on Bookings Menu on the left, it opens the list of bookings and status in each appears as “Paid”. Also, using the orders Menu on the left, if one clicks on a particular booking using View option, there also it appears as “Paid”.

    For all of these options, I want it to read “Credit Sale” instead of “Paid”.

    Any advice on resolving this would be highly appreciated.

    Many thanks in advance !

    Reply
  7. Rosa
    Rosa says:

    Hi Nicola, my customer ordered and paid for 5 boxes subscription. Now she want add in one more box (have not paid). So I need to add in one more box into the existing order and she need to pay by credit card again for subscription. How can I do this? Please help me. Thanks a lot!

    Reply
    • Nicola Mustone
      Nicola Mustone says:

      Hi Rosa,
      I’m sorry that I missed your comment.

      In case you still need it, or for other readers, the best solution here would be to create manually a separate order with the new products and tell the customer to pay for that. You can send them a payment link (found in the order) or just tell them to go to My Account > Orders to find the payment link.

      Reply
  8. felo
    felo says:

    Hi nicola i have another question , for example im not creating the order via frontend , but i wanna change te cost of the product there is a way to achieve that?
    thanks!

    Reply
    • felo
      felo says:

      if the question is not clear i wanna (edit,change) the price of the product in the order via backend . thanks for your time!!

      Reply
    • Nicola Mustone
      Nicola Mustone says:

      Hi felo,
      You can simply set the order status as On Hold and edit the product price in the items list.

      If you still don’t save the order and are in the process of creating it manually from the admin, you can edit the product price after adding it to the order.

      Reply
  9. Frederic D'Amours
    Frederic D'Amours says:

    Hi Nicola, how would solve the issue where I want each order to go automatically on hold after check-out. I don’t want payment to process automatically because I need to edit each order to add fees that I’m not able to manage other than manually. Once the order has been edited I would then flip the status to pending payment so the client is then taken to payment processing.

    Reply

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

You have to agree to the comment policy.

This site uses Akismet to reduce spam. Learn how your comment data is processed.