woocommerce_download_file_xsendfile_file_path

woocommerce_download_file_xsendfile_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_file_path') is found 1 times:

  • /includes/class-wc-download-handler.php line 362
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    }
     
    if ( function_exists( 'apache_get_modules' ) && in_array( 'mod_xsendfile', apache_get_modules(), true ) ) {
        self::download_headers( $parsed_file_path['file_path'], $filename );
        $filepath = apply_filters( 'woocommerce_download_file_xsendfile_file_path', $parsed_file_path['file_path'], $file_path, $filename, $parsed_file_path );
        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 );