You can set CSS color and background color to your custom order status displayed in admin order list this way:

add_action('admin_head', 'styling_admin_order_list' );
function styling_admin_order_list() {
    global $pagenow, $post;

    if( $pagenow != 'edit.php') return; // Exit
    if( get_post_type($post->ID) != 'shop_order' ) return; // Exit

    // HERE we set your custom status
    $order_status = 'Dispatched'; // <==== HERE
    ?>
    <style>
        .order-status.status-<?php echo sanitize_title( $order_status ); ?> {
            background: #d7f8a7;
            color: #0c942b;
        }
    </style>
    <?php
}

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

 

You may Also Like:

Leave a Reply

Your email address will not be published. Required fields are marked *