I did the test and the code worked for only one status. I have 2 different statuses that I want to stay with the same colors.....But it works for only 1.
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 = 'expirado' or 'rejeitado'; // <==== HERE
?>
<style>
.order-status.status-<?php echo sanitize_title( $order_status ); ?> {
background: #c13e41;
color: #ffffff;
}
</style>
<?php
}
Does anyone have any suggestions as to how I can handle this?
Thank you very much!
I did the test and the code worked for only one status. I have 2 different statuses that I want to stay with the same colors.....But it works for only 1.
**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 = 'expirado' or 'rejeitado'; // <==== HERE
?>
<style>
.order-status.status-<?php echo sanitize_title( $order_status ); ?> {
background: #c13e41;
color: #ffffff;
}
</style>
<?php
}**
Does anyone have any suggestions as to how I can handle this?
Thank you very much!