Woocommerce: How make “Processing”, “Completed” orders editable

In WooCommerce, you can only edit the order items if the order is in On Hold or Pending payment status. But there are times when you want to edit the items when the status is under Processing or Completed.

Normally you can just change the status to On Hold and then edit the order items and change back to previous status after you finished editing. Nothing wrong with this method, but it’s quite cumbersome to do so. Why not make the orders items in status On Hold or Pending payment editable by default?

The solution is using  `wc_order_is_editable` filter hook.

Here you go,

add_filter( 'wc_order_is_editable', 'make_processing_orders_editable', 10, 2 );
function make_processing_orders_editable( $is_editable, $order ) {
    if ( $order->get_status() == 'processing' || $order->get_status() == 'complete' ) {
        $is_editable = true;
    }

    return $is_editable;
}

As you can see, this actually not limited to Processing  or Completed order. You can even apply this to Cancelled, Failed, or Refunded order if you like.

Leave A Comment