How to rename Woocommerce order status?

Last Updated: May 11, 2020

Add the following code in your functions.php or custom plugin

// rename processing to shipping
function wc_rename_order_statuses( $statuses ) {
    foreach ( $statuses as $key => $status ) {
        $statuses[ $key ] = $status;
        if ( 'wc-processing' === $key ) {
            $statuses['wc-processing'] = _x( 'Pending', 'Order status', 'woocommerce' );
        }
        if ( 'wc-completed' === $key ) {
            $statuses['wc-completed'] = _x( 'Shipped', 'Order status', 'woocommerce' );
        }
    }
    return $order_statuses;
}
add_filter( 'wc_order_statuses', 'wc_rename_order_statuses' );

 

Add your feedback or comment below: