woocommerce_admin_reports filter-hook . WC 1.0
Filter the list of allowed reports, so that data can be loaded from third party extensions in addition to WooCommerce core. Array items should be in format of array( 'slug' => 'downloads/stats', 'description' => '', 'url' => '', and 'path' => '/wc-ext/v1/...'.
Usage
add_filter( 'woocommerce_admin_reports', 'filter_function_name_2602' ); function filter_function_name_2602( $endpoints ){ // filter... return $endpoints; }
- $endpoints(array)
- The list of allowed reports..
Where the hook is called
woocommerce_admin_reports
woocommerce/packages/woocommerce-admin/src/API/Reports/Controller.php 153
$reports = apply_filters( 'woocommerce_admin_reports', $reports );
woocommerce/includes/admin/class-wc-admin-reports.php 143
$reports = apply_filters( 'woocommerce_admin_reports', $reports );