• Resolved guglielmirent

    (@guglielmirent)


    Good evening, I would like to know how I can assign different colours in the order status frontend.
    example
    completed – Green
    In Work – Yellow
    cancelled – Red

    is this possible?
    Thank you

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Saif

    (@babylon1999)

    Hello @guglielmirent,

    I understand you want the background colour of the status to stand out.


    Link to image: https://d.pr/i/qv3Ybm

    Try this snippet:

    /*  Beautify the order status page  */
    
    add_action( 'wp_print_scripts', 'Beautify_order_status_page' );
    function Beautify_order_status_page() {
    
    	if( ! is_admin() ) {
    		return;
    	}
    	?> <style>
    		      .order-status {
            color: black !important;
          }
          .status-cancelled {
            background-color: red !important;
          }
          .status-completed {
            background-color: green !important;
          }
          .status-processing {
            background-color: skyblue !important;
          }
    	</style> <?php
    }

    You can add it to your functions.php file or use a plugin like Code snippet.

    Let us know if I misunderstood your request!

    Thread Starter guglielmirent

    (@guglielmirent)

    No sorry, maybe I explained it wrong, on my account page, customer side

    Page screen

    https://imgur.com/a/f7TRsqY

    Saif

    (@babylon1999)

    No sorry, maybe I explained it wrong, on my account page, customer side

    Thank you for sharing the screenshot!

    The element in question is a part of your theme, not WooCommerce. You may find this guide helpful for changing the background color using CSS. I recommend contacting your theme author for further assistance with basic CSS modifications.

    Alternatively, you can hire a WooExpert to help you with this as custom solutions are not within our scope of support.

    Please let us know if you have any other questions.

    Cheers!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Different color order status in frontpage’ is closed to new replies.