This first snippet goes in your wp-config file and disables the connection options listed under the sub-menu.
// Hide AI options.
define( 'WP_AI_SUPPORT', false );
This next snippet goes in your functions.php file and hides the “Connectors” submenu page from the dashboard entirely.
function prefix_remove_AI_menu(){
remove_submenu_page( 'options-general.php', 'options-connectors.php' );
}
add_action( 'admin_menu', 'prefix_remove_AI_menu' );