How to Hide the "WP GDPR Compliance" Admin Menu

function plt_hide_wp_gdpr_compliance_menus() {
	//Hide the "Tools → WP GDPR Compliance" menu.
	remove_submenu_page('tools.php', 'wp_gdpr_compliance');
}

add_action('admin_menu', 'plt_hide_wp_gdpr_compliance_menus', 11);

Where do I put this code?