add_action('pre_current_active_plugins', 'kpry_hide_plugins');
function kpry_hide_plugins() {
$current_user = wp_get_current_user();
global $wp_list_table;
if ( $current_user->user_email != '[email protected]' && $current_user->user_email != '[email protected]' ) {
$hidearr = array(
'advanced-custom-fields-pro/acf.php'
);
$myplugins = $wp_list_table->items;
foreach ( $myplugins as $key => $val ) {
if ( in_array( $key,$hidearr ) ) {
unset( $wp_list_table->items[$key] );
}
}
}
}
// DOES NOT WORK IN MULTISITE
// https://trickspanda.com/hide-wordpress-plugin-plugin-list/