woocommerce_admin_reports filter-hookWC 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', 'wp_kama_woocommerce_admin_reports_filter' );

/**
 * Function for `woocommerce_admin_reports` filter-hook.
 * 
 * @param array $endpoints The list of allowed reports..
 *
 * @return array
 */
function wp_kama_woocommerce_admin_reports_filter( $endpoints ){

	// filter...
	return $endpoints;
}
$endpoints(array)
The list of allowed reports..

Where the hook is called

Controller::get_items()
WC_Admin_Reports::get_reports()
woocommerce_admin_reports
woocommerce/src/Admin/API/Reports/Controller.php 108
$reports = apply_filters( 'woocommerce_admin_reports', $reports );
woocommerce/includes/admin/class-wc-admin-reports.php 143
$reports = apply_filters( 'woocommerce_admin_reports', $reports );

Where the hook is used in WooCommerce

Usage not found.