wpo_wcpdf_item_row_class

The WooCommerce PDF Invoices & Packing Slips wpo wcpdf item row class hook.

Description

apply_filters( 'wpo_wcpdf_item_row_class', (unknown) $item_id, (unknown) $wpo_wcpdf_export_template_type, (unknown) $wpo_wcpdf_export_order, (unknown) $item_id ); 

Parameters (4)

0. $item_id (unknown)
The item id.
1. $wpo_wcpdf_export_template_type (unknown)
The wpo wcpdf export template type.
2. $wpo_wcpdf_export_order (unknown)
The wpo wcpdf export order.
3. $item_id (unknown)
The item id.

Usage

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

Defined (2)

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

/templates/pdf/Simple/packing-slip.php  
  1. <tr class="<?php echo apply_filters( 'wpo_wcpdf_item_row_class', $item_id, $wpo_wcpdf->export->template_type, $wpo_wcpdf->export->order, $item_id ); ?>"> 
/templates/pdf/Simple/invoice.php  
  1. <tr class="<?php echo apply_filters( 'wpo_wcpdf_item_row_class', $item_id, $wpo_wcpdf->export->template_type, $wpo_wcpdf->export->order, $item_id ); ?>">