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
processing
You can allow more order statuses to be editable copying the code from
3
5
7
if
Leave a Reply