woocommerce_(order_type)_list_table_order_css_classes
Filters the list of CSS class names for a given order row in the orders list table.
Usage
add_filter( 'woocommerce_(order_type)_list_table_order_css_classes', 'wp_kama_woocommerce_order_type_list_table_css_classes_filter', 10, 2 ); /** * Function for `woocommerce_(order_type)_list_table_order_css_classes` filter-hook. * * @param string[] $classes An array of CSS class names. * @param \WC_Order $order The order object. * * @return string[] */ function wp_kama_woocommerce_order_type_list_table_css_classes_filter( $classes, $order ){ // filter... return $classes; }
- $classes(string[])
- An array of CSS class names.
- $order(\WC_Order)
- The order object.
Changelog
Since 7.8.0 | Introduced. |
Where the hook is called
woocommerce_(order_type)_list_table_order_css_classes
woocommerce/src/Internal/Admin/Orders/ListTable.php 130-138
$css_classes = apply_filters( 'woocommerce_' . $this->order_type . '_list_table_order_css_classes', array( 'order-' . $order->get_id(), 'type-' . $order->get_type(), 'status-' . $order->get_status(), ), $order );