Skip to content

Commit 1121be6

Browse files
committed
ensure all existing buffers are closed before streaming the product feed file
1 parent bf3b999 commit 1121be6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Feed/Generator.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,10 @@ public function render( $no_cache = false ) {
273273
}
274274

275275
if ( is_file( $file_path ) ) {
276+
while ( ob_get_level() ) {
277+
ob_end_clean();
278+
}
279+
276280
header( 'Content-Type: application/xml; charset=utf-8' );
277281
header( 'Content-Length: ' . filesize( $file_path ) );
278282
nocache_headers();

0 commit comments

Comments
 (0)