Tips on Customizing Post SMTP – WordPress SMTP Plugin with Email Logs and Mobile App for Failure Notifications – Gmail SMTP, Office 365, Brevo, Mailgun, Amazon SES and more

How to Hide Post SMTP Admin Menus

function plt_hide_post_smtp_menus() {
	//Hide "Post SMTP".
	remove_menu_page('postman');
	//Hide "Post SMTP → Dashboard".
	remove_submenu_page('postman', 'postman');
	//Hide "Post SMTP → Email Log".
	remove_submenu_page('postman', 'postman_email_log');
	//Hide "Post SMTP → Mobile AppNew".
	remove_submenu_page('postman', 'http://127.0.0.1/wp-admin/admin.php?page=postman/configuration#mobile-app');
	//Hide "Post SMTP → Settings".
	remove_submenu_page('postman', 'postman/configuration');
	//Hide "Post SMTP → Get Pro Bundle".
	remove_submenu_page('postman', 'https://postmansmtp.com/pricing/?utm_source=plugin&utm_medium=submenu&utm_campaign=plugin');
	//Hide "Post SMTP → Contact Us".
	remove_submenu_page('postman', 'postman-contact');
	//Hide "Post SMTP → Support Forum".
	remove_submenu_page('postman', 'postman-wp-support-forum');
}

add_action('admin_menu', 'plt_hide_post_smtp_menus', 1000000000);

Where do I put this code?

How to Hide the "Postman SMTP" Dashboard Widget

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

	//Remove the "Postman SMTP" widget.
	remove_meta_box('example_dashboard_widget', 'dashboard', 'normal');
}

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