Tips on Customizing Paid Memberships Pro

How to Hide Paid Memberships Pro Admin Menus

function plt_hide_paid_memberships_pro_menus() {
	//Hide "Memberships".
	remove_menu_page('pmpro-dashboard');
	//Hide "Memberships → Dashboard".
	remove_submenu_page('pmpro-dashboard', 'pmpro-dashboard');
	//Hide "Memberships → Members".
	remove_submenu_page('pmpro-dashboard', 'pmpro-memberslist');
	//Hide "Memberships → Orders".
	remove_submenu_page('pmpro-dashboard', 'pmpro-orders');
	//Hide "Memberships → Reports".
	remove_submenu_page('pmpro-dashboard', 'pmpro-reports');
	//Hide "Memberships → Settings".
	remove_submenu_page('pmpro-dashboard', 'pmpro-membershiplevels');
	//Hide "Memberships → Add Ons".
	remove_submenu_page('pmpro-dashboard', 'pmpro-addons');
	//Hide "Memberships → License".
	remove_submenu_page('pmpro-dashboard', 'pmpro-license');
}

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

Where do I put this code?

How to Hide the "Require Membership" Meta Box

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

	//Hide the "Require Membership" meta box.
	remove_meta_box('pmpro_page_meta', $screen->id, 'side');
}

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