How to Hide Cache Autopilot Admin Menus

function plt_hide_cache_autopilot_menus() {
	//Hide the "Settings → Cache Invalidator" menu.
	remove_submenu_page('options-general.php', 'cache-autopilot-invalidator');
	//Hide the "Settings → Cache Warmup" menu.
	remove_submenu_page('options-general.php', 'cache-autopilot-warmup');
}

add_action('admin_menu', 'plt_hide_cache_autopilot_menus', 21);

Where do I put this code?