Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter mikesee

    (@mikesee)

    this is what I’ve tried

    /* purolator change color */
    add_action( 'get_ast_provider_name_callback', 'color_purolator', 10, 3 );
    function color_purolator ($provider_name){
    	if ($provider_name = 'Purolator' ) {
    	    return "<p style='color:red'>";	
    	}
    }
    Plugin Author Zorem

    (@zorem)

    Hi @mikesee,

    Use the below code snippet to change the color of shipping providers in the admin order display column.

    // Add this code to your theme functions.php file or a custom plugin 
    add_filter( 'get_ast_provider_name', 'get_ast_provider_name_filter', 10, 2 );
    function get_ast_provider_name_filter( $tracking_provider, $results ) {
    	if ($tracking_provider == 'Purolator' ) {
    	    return "<span style='color:red'>".$tracking_provider."</span>";	
    	}
    	return $tracking_provider;
    }

    Thanks,

    • This reply was modified 4 years, 5 months ago by Zorem.
    Thread Starter mikesee

    (@mikesee)

    This is exactly what I was looking for. Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Change color of shipping providers’ is closed to new replies.