woocommerce_admin_html_order_item_class

The WooCommerce woocommerce admin html order item class hook.

Description

apply_filters( 'woocommerce_admin_html_order_item_class', (unknown) $class, (unknown) $item, (unknown) $order ); 

Parameters (3)

0. $class (unknown) => ( ! empty( $class ) ? $class : '' )
The empty class class.
1. $item (unknown)
The item.
2. $order (unknown)
The order.

Usage

To run the hook, copy the example below.
  1. $class = apply_filters( 'woocommerce_admin_html_order_item_class', $class, $item, $order ); 
  2.  
  3. if ( !empty( $class ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the woocommerce_admin_html_order_item_class callback 
  2. function filter_woocommerce_admin_html_order_item_class( $class, $item, $order ) { 
  3. // make filter magic happen here... 
  4. return $class
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'woocommerce_admin_html_order_item_class', 'filter_woocommerce_admin_html_order_item_class', 10, 3 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'woocommerce_admin_html_order_item_class', 'filter_woocommerce_admin_html_order_item_class', 10, 3 ); 

Defined (1)

The filter is defined in the following location(s).

/includes/admin/meta-boxes/views/html-order-item.php  
  1. <tr class="item <?php echo apply_filters( 'woocommerce_admin_html_order_item_class', ( ! empty( $class ) ? $class : '' ), $item, $order ); ?>" data-order_item_id="<?php echo esc_attr( $item_id ); ?>">