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

apply_filters('woocommerce_download_file_xsendfile_lighttpd_file_path') is found 1 times:

  • /includes/class-wc-download-handler.php line 370
    			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 );