woocommerce_reports_taxes_rate

The WooCommerce EU VAT Assistant woocommerce reports taxes rate hook.

Description

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

Parameters (3)

0. $rate_tax_rate (unknown)
The rate 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. $rate_tax_rate = apply_filters( 'woocommerce_reports_taxes_rate', $rate_tax_rate, $rate_id, $tax_row ); 
  2.  
  3. if ( !empty( $rate_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_rate callback 
  2. function filter_woocommerce_reports_taxes_rate( $rate_tax_rate, $rate_id, $tax_row ) { 
  3. // make filter magic happen here... 
  4. return $rate_tax_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 (2)

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

/src/lib/classes/reporting/reports/base/base_sales_report.php  
  1. <td class="tax_rate"><?php echo number_format(apply_filters('woocommerce_reports_taxes_rate', $rate->tax_rate, $rate_id, $tax_row), 2); ?>%</td> 
/src/lib/classes/reporting/reports/base/base_eu_vat_by_country_report.php  
  1. <td class="tax_rate"><?php echo number_format(apply_filters('woocommerce_reports_taxes_rate', $rate->tax_rate, $rate_id, $tax_row), 2); ?>%</td>