How to Hide MailPoet Admin Menus

function plt_hide_mailpoet_menus() {
	//Hide the "MailPoet" menu.
	remove_menu_page('mailpoet-newsletters');
	//Hide the "Tools → Scheduled Actions" menu.
	remove_submenu_page('tools.php', 'action-scheduler');
}

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

Where do I put this code?