woocommerce_admin_reports
The WooCommerce woocommerce admin reports hook.
Description
Parameters (1)
- 0. $reports (unknown)
- The reports.
Usage
- To run the hook, copy the example below.
- $reports = apply_filters( 'woocommerce_admin_reports', $reports );
- if ( !empty( $reports ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the woocommerce_admin_reports callback
- function filter_woocommerce_admin_reports( $reports ) {
- // make filter magic happen here...
- return $reports;
- };
- // add the filter
- add_filter( 'woocommerce_admin_reports', 'filter_woocommerce_admin_reports', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'woocommerce_admin_reports', 'filter_woocommerce_admin_reports', 10, 1 );
Defined (1)
The filter is defined in the following location(s).
- /includes/admin/class-wc-admin-reports.php
- $reports = apply_filters( 'woocommerce_admin_reports', $reports );