Renaming WooCommerce Order Status

I would like to rename the WooCommerce order status from “Completed” to “Order Received”. I can edit the script below located in wc-order-functions.php, but I would prefer not to modify any core files or use a plugin.

Is it possible to override woocoomerce functions with scripts in child theme’s functions.php file?

function wc_get_order_statuses() {
  $order_statuses = array(
    'wc-pending'    => _x( 'Pending Payment', 'Order status', 'woocommerce' ),
    'wc-processing' => _x( 'Processing', 'Order status', 'woocommerce' ),
    'wc-on-hold'    => _x( 'On Hold', 'Order status', 'woocommerce' ),
    'wc-completed'  => _x( 'Completed', 'Order status', 'woocommerce' ),
    'wc-cancelled'  => _x( 'Cancelled', 'Order status', 'woocommerce' ),
    'wc-refunded'   => _x( 'Refunded', 'Order status', 'woocommerce' ),
    'wc-failed'     => _x( 'Failed', 'Order status', 'woocommerce' ),
  );
  return apply_filters( 'wc_order_statuses', $order_statuses );
}

Related posts

Leave a Reply

4 comments

  1. Just renaming order status “Completed” to “Order Received”, it’s easy and can be accomplished this way with wc_order_statuses hook (you will paste this snippet in your active child theme function.php file):

    add_filter( 'wc_order_statuses', 'wc_renaming_order_status' );
    function wc_renaming_order_status( $order_statuses ) {
        foreach ( $order_statuses as $key => $status ) {
            if ( 'wc-completed' === $key ) 
                $order_statuses['wc-completed'] = _x( 'Order Received', 'Order status', 'woocommerce' );
        }
        return $order_statuses;
    }
    

    Code goes in function.php file of your active child theme (or active theme). Tested and Works.

    Update 2018 – To rename, in Order list page:
    • the bulk actions dropdown
    • the order status tabs (with the count)
    See: Rename multiple order statuses in Woocommerce

    Other related reference: How to create a custom order status in woocommerce

  2. The accepted answer does a good job in most places, but the order status filter on the main order page is unaffected, as mentioned in one of the comments.

    To update this you must also hook into the filter woocommerce_register_shop_order_post_statuses and update label_count like so:

    // Rename order status 'Completed' to 'Order Received' in admin main view - different hook, different value than the other places
    function wc_rename_order_status_type( $order_statuses ) {
        foreach ( $order_statuses as $key => $status ) {
            $new_order_statuses[ $key ] = $status;
            if ( 'wc-completed' === $key ) {
                $order_statuses['wc-completed']['label_count'] = _n_noop( 'Order Received <span class="count">(%s)</span>', 'Order Received <span class="count">(%s)</span>', 'woocommerce' );
            }
        }
        return $order_statuses;
    }
    add_filter( 'woocommerce_register_shop_order_post_statuses', 'wc_rename_order_status_type' );
    

    You will also need to update the string in the ‘Bulk Actions’ dropdown. Hooking into WordPress’ gettext filter let’s you do it, like so:

    // Rename order status in the bulk actions dropdown on main order list
    function rename_bulk_status( $translated_text, $untranslated_text, $domain ) {
        if( is_admin()) {
            if( $untranslated_text == 'Change Status To completed' )
                $translated_text = __( 'Change Status To Order Received','woocommerce' );
        }
        return $translated_text;
    }
    
    add_filter('gettext', 'rename_bulk_status', 20, 3);
    

    So add these to the accepted answer above so you have all 3 functions.

  3. I had a similar wish, but for some reason Loic’s solution did not work with my shop. So I want to share my simple solution.

    With the free plugin LocoTranslate you can easily rename the order status for your language. If your page needs no translation (i.e. it is in English), it might still be handy.

    Simply create a totally new translation file and enter only the new order status replacing the original name. All other terms are not affected by this language file, if the fields stay empty (don’t forget to activate this pseudo-translation in page settings).

    This way, there is a good chance that WooCommerce updates will not affect it.

  4. Go to plugin Editor -> choose WooCommerce -> includes -> admin -> class-wc-admin-dashboard.php (Edit Line 45)

    DO NOT COPY PASTE THE CONTENT FROM HERE. FIND & REPLACE

    Default———————–

    public function init() {
                // Reviews Widget.
                if ( current_user_can( 'publish_shop_orders' ) && post_type_supports( 'product', 'comments' ) ) {
                    wp_add_dashboard_widget( 'woocommerce_dashboard_recent_reviews', __( 'WooCommerce Recent Reviews', 'woocommerce' ), array( $this, 'recent_reviews' ) );
                }
                wp_add_dashboard_widget( 'woocommerce_dashboard_status', __( 'WooCommerce Status', 'woocommerce' ), array( $this, 'status_widget' ) );
    

    Edited————–

    public function init() {
                // Reviews Widget.
                if ( current_user_can( 'publish_shop_orders' ) && post_type_supports( 'product', 'comments' ) ) {
                    wp_add_dashboard_widget( 'woocommerce_dashboard_recent_reviews', __( 'WooCommerce Recent Reviews', 'woocommerce' ), array( $this, 'recent_reviews' ) );
                }
                wp_add_dashboard_widget( 'woocommerce_dashboard_status', __( 'Shop Status', 'woocommerce' ), array( $this, 'status_widget' ) );