WC_Download_Handler::flush_output
Send the output so far to the web server.
PHP's flush() only pushes its own write buffer, so a remaining output buffer has to be flushed into it first. Only call this after file data has been output: some servers send the headers on flush(), and a read that fails before any data must still be able to send an error page instead.
Method of the class: WC_Download_Handler{}
No Hooks.
Returns
null. Nothing (null).
Usage
$result = WC_Download_Handler::flush_output(): void;
WC_Download_Handler::flush_output() WC Download Handler::flush output code WC 11.3.0
private static function flush_output(): void {
$buffer = ob_get_status();
if ( $buffer && ( $buffer['flags'] & PHP_OUTPUT_HANDLER_FLUSHABLE ) ) {
ob_flush();
}
flush();
}