How to Hide the "REST API Enabler" Admin Menu

function plt_hide_rest_api_enabler_menus() {
	//Hide the "Settings → REST API Enabler" menu.
	remove_submenu_page('options-general.php', 'rest-api-enabler');
}

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

Where do I put this code?