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.8.1

apply_filters('woocommerce_admin_reports') is found 2 times:

  • /includes/admin/class-wc-admin-reports.php line 216
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    *             // ...
     *
     * @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
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    * '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: