woocommerce_download_file_xsendfile_lighttpd_file_path

woocommerce_download_file_xsendfile_lighttpd_file_path

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

See hook in core

Displaying hooks found in version: woocommerce.9.7.1

apply_filters('woocommerce_download_file_xsendfile_lighttpd_file_path') is found 1 times:

  • /includes/class-wc-download-handler.php line 367
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
        header( 'X-Sendfile: ' . $filepath );
        exit;
    } elseif ( stristr( getenv( 'SERVER_SOFTWARE' ), 'lighttpd' ) ) {
        self::download_headers( $parsed_file_path['file_path'], $filename );
        $filepath = apply_filters( 'woocommerce_download_file_xsendfile_lighttpd_file_path', $parsed_file_path['file_path'], $file_path, $filename, $parsed_file_path );
        header( 'X-Lighttpd-Sendfile: ' . $filepath );
        exit;
    } elseif ( stristr( getenv( 'SERVER_SOFTWARE' ), 'nginx' ) || stristr( getenv( 'SERVER_SOFTWARE' ), 'cherokee' ) ) {
        self::download_headers( $parsed_file_path['file_path'], $filename );
        $xsendfile_path = trim( preg_replace( '`^' . str_replace( '\\', '/', getcwd() ) . '`', '', $parsed_file_path['file_path'] ), '/' );
        $xsendfile_path = apply_filters( 'woocommerce_download_file_xsendfile_x_accel_redirect_file_path', $xsendfile_path, $file_path, $filename, $parsed_file_path );