Tips on Customizing Icegram Collect – Easy Form, Lead Collection and Subscription plugin

How to Hide Icegram Collect - Easy Form, Lead Collection and Subscription plugin Admin Menus

function plt_hide_icegram_rainmaker_menus() {
	//Hide "Icegram Collect".
	remove_menu_page('edit.php?post_type=rainmaker_form');
	//Hide "Icegram Collect → Forms".
	remove_submenu_page('edit.php?post_type=rainmaker_form', 'edit.php?post_type=rainmaker_form');
	//Hide "Icegram Collect → Create New Form".
	remove_submenu_page('edit.php?post_type=rainmaker_form', 'post-new.php?post_type=rainmaker_form');
	//Hide "Icegram Collect → Leads".
	remove_submenu_page('edit.php?post_type=rainmaker_form', 'edit.php?post_type=rainmaker_lead');
	//Hide "Icegram Collect → Docs & Support".
	remove_submenu_page('edit.php?post_type=rainmaker_form', 'icegram-rainmaker-support');
	//Hide "Icegram Collect → 🔥 Go Max".
	remove_submenu_page('edit.php?post_type=rainmaker_form', 'icegram-rainmaker-upgrade');
}

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

Where do I put this code?

How to Hide the "Upgrade to Icegram Collect" Meta Box

function plt_hide_icegram_rainmaker_metaboxes() {
	$screen = get_current_screen();
	if ( !$screen ) {
		return;
	}

	//Hide the "Upgrade to Icegram Collect" meta box.
	remove_meta_box('rm_upsale_premium_metabox', $screen->id, 'side');
}

add_action('add_meta_boxes', 'plt_hide_icegram_rainmaker_metaboxes', 20);