woocommerce_reports_taxes_rate

The WooCommerce woocommerce reports taxes rate hook.

Description

apply_filters( 'woocommerce_reports_taxes_rate', (unknown) $rate, (unknown) $rate_id, (unknown) $tax_row ); 

Parameters (3)

0. $rate (unknown)
The 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. $rate = apply_filters( 'woocommerce_reports_taxes_rate', $rate, $rate_id, $tax_row ); 
  2.  
  3. if ( !empty( $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_rate callback 
  2. function filter_woocommerce_reports_taxes_rate( $rate, $rate_id, $tax_row ) { 
  3. // make filter magic happen here... 
  4. return $rate
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'woocommerce_reports_taxes_rate', 'filter_woocommerce_reports_taxes_rate', 10, 3 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'woocommerce_reports_taxes_rate', 'filter_woocommerce_reports_taxes_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. <td><?php echo apply_filters( 'woocommerce_reports_taxes_rate', $rate, $rate_id, $tax_row ); ?>%</td>