woocommerce_report_downloads_query_from

woocommerce_report_downloads_query_from

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.9.8.1

apply_filters('woocommerce_report_downloads_query_from') is found 1 times:

  • /includes/admin/reports/class-wc-report-downloads.php line 330
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
            if ( ! is_null( $filters->user_ip_address ) ) {
                $query_from .= $wpdb->prepare( ' AND user_ip_address = %s ', $filters->user_ip_address );
            }
     
            $query_from  = apply_filters( 'woocommerce_report_downloads_query_from', $query_from );
            $query_order = $wpdb->prepare( 'ORDER BY timestamp DESC LIMIT %d, %d;', ( $current_page - 1 ) * $per_page, $per_page );
     
            $this->items     = $wpdb->get_results( "SELECT * {$query_from} {$query_order}" ); // WPCS: cache ok, db call ok, unprepared SQL ok.
            $this->max_items = $wpdb->get_var( "SELECT COUNT( DISTINCT download_log_id ) {$query_from};" ); // WPCS: cache ok, db call ok, unprepared SQL ok.
        }
    }