woocommerce_reports_taxes_tax_rate

The WooCommerce woocommerce reports taxes tax rate hook.

Description

apply_filters( 'woocommerce_reports_taxes_tax_rate', (unknown) $tax_row_tax_rate, (unknown) $rate_id, (unknown) $tax_row ); 

Parameters (3)

0. $tax_row_tax_rate (unknown)
The tax row tax rate.
1. $rate_id (unknown)
The rate id.
2. $tax_row (unknown)
The tax row.

Usage

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

Defined (1)

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

/includes/admin/reports/class-wc-report-taxes-by-code.php  
  1. <th scope="row"><?php echo apply_filters( 'woocommerce_reports_taxes_tax_rate', $tax_row->tax_rate, $rate_id, $tax_row ); ?></th>