• Hello,

    Is there any way to color order statuses (as they are colored by woocommerce or custom colors)? This will be very helpful to quickly identify cancelled or refunded orders and avoid mistakes.

Viewing 1 replies (of 1 total)
  • Plugin Author algol.plus

    (@algolplus)

    Hello

    Please, add following code (for XLS!) to “Misc Settings” and adapt for your needs.

    add_action( "woe_xls_format_cell", function($formatter, $field, $text, $row, $pos ){
    
    if($field !="order_status") return;
    
    $color = "FFFFFF"; //white
    if($text == "Processing") $color = "c6e1c6";
    if($text == "On hold") $color = "94660c";
    
    $formatter->objPHPExcel->getActiveSheet()->getStyleByColumnAndRow( $pos, $formatter->last_row+1)->applyFromArray(
        array(
            'fill' => array(
                'type' => PHPExcel_Style_Fill::FILL_SOLID,
                'color' => array('rgb' => $color)
            )
        )
    );
    },10,5);
Viewing 1 replies (of 1 total)

The topic ‘Color Order Statuses’ is closed to new replies.