Tips on Customizing Marketing Toolkit by OptinMonster – Popups, Email Optin Forms & Newsletter Subscribers

How to Hide OptinMonster Admin Menus

function plt_hide_optinmonster_menus() {
	//Hide "OptinMonster".
	remove_menu_page('optin-monster-dashboard');
	//Hide "OptinMonster → Dashboard".
	remove_submenu_page('optin-monster-dashboard', 'optin-monster-dashboard');
	//Hide "OptinMonster → Campaigns".
	remove_submenu_page('optin-monster-dashboard', 'optin-monster-campaigns');
	//Hide "OptinMonster → Templates".
	remove_submenu_page('optin-monster-dashboard', 'optin-monster-templates');
	//Hide "OptinMonster → Subscribers".
	remove_submenu_page('optin-monster-dashboard', 'optin-monster-monsterleads');
	//Hide "OptinMonster → Integrations".
	remove_submenu_page('optin-monster-dashboard', 'optin-monster-integrations');
	//Hide "OptinMonster → Settings".
	remove_submenu_page('optin-monster-dashboard', 'optin-monster-settings');
	//Hide "OptinMonster → Personalization".
	remove_submenu_page('optin-monster-dashboard', 'optin-monster-personalization');
	//Hide "OptinMonster → University".
	remove_submenu_page('optin-monster-dashboard', 'optin-monster-university');
	//Hide "OptinMonster → Social Proof Widget".
	remove_submenu_page('optin-monster-dashboard', 'optin-monster-trustpulse');
	//Hide "OptinMonster → About Us".
	remove_submenu_page('optin-monster-dashboard', 'optin-monster-about');
}

add_action('admin_menu', 'plt_hide_optinmonster_menus', 1000);

Where do I put this code?

How to Hide OptinMonster Meta Boxes

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

	//Hide the "OptinMonster Settings" meta box.
	remove_meta_box('om-global-post-settings', $screen->id, 'side');
	//Hide the "Promote this coupon" meta box.
	remove_meta_box('woocommerce_promote_coupon_metabox', $screen->id, 'advanced');
	//Hide the "Product Popups" meta box.
	remove_meta_box('woocommerce_popup_metabox', $screen->id, 'advanced');
}

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

How to Hide the "Please Connect OptinMonster" Dashboard Widget

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

	//Remove the "Please Connect OptinMonster" widget.
	remove_meta_box('optin_monster_db_widget', 'dashboard', 'normal');
}

add_action('wp_dashboard_setup', 'plt_hide_optinmonster_dashboard_widgets', 20);