Only load tables for system that is part of current multisite, this avoids displaying all tables in a MS speeding up page load, and also prevent divulding tables on other sites in the MS environment.
This commit is contained in:
parent
404fbca655
commit
beaa610cc0
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue