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

apply_filters('woocommerce_download_file_xsendfile_file_path') is found 1 times:

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