woocommerce_admin_reports

woocommerce_admin_reports

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: woocommerce.9.9.5

apply_filters('woocommerce_admin_reports') is found 2 times:

  • /includes/admin/class-wc-admin-reports.php line 216
    		 *             // ...
    		 *
    		 * @param array $reports The associative array of reports.
    		 */
    		$reports = apply_filters( 'woocommerce_admin_reports', $reports );
    		$reports = apply_filters( 'woocommerce_reports_charts', $reports ); // Backwards compatibility.
    
    		foreach ( $reports as $key => &$report_group ) {
    			if ( isset( $report_group['charts'] ) ) {
    				$report_group['reports'] = $report_group['charts'];
    			}
    
  • /src/Admin/API/Reports/Controller.php line 111
    		 * 'url' => '', and 'path' => '/wc-ext/v1/...'.
    		 *
    		 * @param array $endpoints The list of allowed reports..
    		 */
    		$reports = apply_filters( 'woocommerce_admin_reports', $reports );
    
    		foreach ( $reports as $report ) {
    			// Silently skip non-compliant reports. Like the ones for WC_Admin_Reports::get_reports().
    			if ( empty( $report['slug'] ) ) {
    				continue;
    			}
    

See this hook used in plugins: