Tips on Customizing Advanced Access Manager

How to Hide Advanced Access Manager Admin Menus

function plt_hide_advanced_access_manager_menus() {
	//Hide the "AAM" menu.
	remove_menu_page('aam');
	//Hide the "AAM → AAM" menu.
	remove_submenu_page('aam', 'aam');
	//Hide the "AAM → Access Policies" menu.
	remove_submenu_page('aam', 'edit.php?post_type=aam_policy');
}

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

Where do I put this code?

How to Hide the "Access Manager by AAM plugin" Meta Box

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

	//Hide the "Access Manager by AAM plugin" meta box.
	remove_meta_box('aam-acceess-manager', $screen->id, 'advanced');
}

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