Add woocommerce_admin_html_order_preview_item_class filter

For parity with woocommerce_admin_html_order_item_class filter in html-order-item.php view.
This commit is contained in:
Manos Psychogyiopoulos 2018-01-18 16:57:51 +02:00
parent dbb6e2716d
commit e77ec2444e
1 changed files with 4 additions and 2 deletions

View File

@ -459,9 +459,11 @@ class WC_Admin_List_Table_Orders extends WC_Admin_List_Table {
<tbody>'; <tbody>';
foreach ( $line_items as $item_id => $item ) { foreach ( $line_items as $item_id => $item ) {
$product_object = is_callable( array( $item, 'get_product' ) ) ? $item->get_product() : null;
$html .= '<tr class="wc-order-preview-table__item wc-order-preview-table__item--' . esc_attr( $item_id ) . '">'; $product_object = is_callable( array( $item, 'get_product' ) ) ? $item->get_product() : null;
$row_class = apply_filters( 'woocommerce_admin_html_order_preview_item_class', '', $item, $order );
$html .= '<tr class="wc-order-preview-table__item wc-order-preview-table__item--' . esc_attr( $item_id ) . ( $row_class ? ' ' . esc_attr( $row_class ) : '' ) . '">';
foreach ( $columns as $column => $label ) { foreach ( $columns as $column => $label ) {
$html .= '<td class="wc-order-preview-table__column--' . esc_attr( $column ) . '">'; $html .= '<td class="wc-order-preview-table__column--' . esc_attr( $column ) . '">';