I'm using the following code to create a new custom order status for Woocommerce. The problem I have is that in the admin, the status shows up as unstyled. How can I style the custom status in a similar way to how "Processing" is?
/* Adding a new custom order status */
function register_manual_order_status() {
register_post_status( 'wc-manual', array(
'label' => 'Manual Order',
'public' => true,
'exclude_from_search' => false,
'show_in_admin_all_list' => true,
'show_in_admin_status_list' => true,
'label_count' => _n_noop( 'Manual order (%s)', 'Manual order (%s)' )
) );
}
add_action( 'init', 'register_manual_order_status' );
// Add to list of WC Order statuses
function add_manual_to_order_statuses( $order_statuses ) {
$new_order_statuses = array();
// add new order status after processing
foreach ( $order_statuses as $key => $status ) {
$new_order_statuses[ $key ] = $status;
if ( 'wc-processing' === $key ) {
$new_order_statuses['wc-manual'] = 'Manual';
}
}
return $new_order_statuses;
}
add_filter( 'wc_order_statuses', 'add_manual_to_order_statuses' );

