diff --git a/includes/api/class-wc-rest-system-status-controller.php b/includes/api/class-wc-rest-system-status-controller.php index b8c3f1d807b..fcf79e1bcda 100644 --- a/includes/api/class-wc-rest-system-status-controller.php +++ b/includes/api/class-wc-rest-system-status-controller.php @@ -722,6 +722,12 @@ class WC_REST_System_Status_Controller extends WC_REST_Controller { ); foreach ( $database_table_sizes as $table ) { + // Only include tables matching the prefix of the current site, this is to prevent displaying all tables on a MS install not relating to the current. + if ( is_multisite() ) { + if ( 0 !== strpos( $table->name, $wpdb->prefix ) ) { + continue; + } + } $table_type = in_array( $table->name, $core_tables ) ? 'woocommerce' : 'other'; $tables[ $table_type ][ $table->name ] = array(