diff --git a/includes/admin/views/html-admin-page-status-report.php b/includes/admin/views/html-admin-page-status-report.php
index 95f68be650c..8655e70faf9 100644
--- a/includes/admin/views/html-admin-page-status-report.php
+++ b/includes/admin/views/html-admin-page-status-report.php
@@ -457,10 +457,12 @@
WC()->plugin_path() . '/templates/' ) );
+ $scanned_files = array();
$found_files = array();
- foreach ( $template_paths as $plugin_name => $template_path )
+ foreach ( $template_paths as $plugin_name => $template_path ) {
$scanned_files[ $plugin_name ] = $this->scan_template_files( $template_path );
+ }
foreach ( $scanned_files as $plugin_name => $files ) {
foreach ( $files as $file ) {