Tips on Customizing WPCargo Track & Trace

How to Hide WPCargo Admin Menus

function plt_hide_wpcargo_menus() {
	//Hide "Shipment".
	remove_menu_page('edit.php?post_type=wpcargo_shipment');
	//Hide "Shipment → All Shipment".
	remove_submenu_page('edit.php?post_type=wpcargo_shipment', 'edit.php?post_type=wpcargo_shipment');
	//Hide "Shipment → Add Shipment".
	remove_submenu_page('edit.php?post_type=wpcargo_shipment', 'post-new.php?post_type=wpcargo_shipment');
	//Hide "Shipment → Tags".
	remove_submenu_page('edit.php?post_type=wpcargo_shipment', 'edit-tags.php?taxonomy=post_tag&post_type=wpcargo_shipment');
	//Hide "Shipment → Category".
	remove_submenu_page('edit.php?post_type=wpcargo_shipment', 'edit-tags.php?taxonomy=wpcargo_shipment_cat&post_type=wpcargo_shipment');
	//Hide "Shipment → Reports".
	remove_submenu_page('edit.php?post_type=wpcargo_shipment', 'wpc-report-export');

	//Hide "WPCargo".
	remove_menu_page('wpcargo-settings');
	//Hide "WPCargo → Multiple Package Settings".
	remove_submenu_page('wpcargo-settings', 'admin.php?page=wpc-multiple-package');
	//Hide "WPCargo → Map Settings".
	remove_submenu_page('wpcargo-settings', 'admin.php?page=wpc-shmap-settings');
	//Hide "WPCargo → General Settings".
	remove_submenu_page('wpcargo-settings', 'wpcargo-settings');
	//Hide "WPCargo → Client Account Setting".
	remove_submenu_page('wpcargo-settings', 'admin.php?page=wpcargo-account-settings');
	//Hide "WPCargo → Client Email Settings".
	remove_submenu_page('wpcargo-settings', 'wpcargo-email-settings');
	//Hide "WPCargo → Admin Email Settings".
	remove_submenu_page('wpcargo-settings', 'wpcargo-admin-email-settings');
}

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

Where do I put this code?

How to Hide WPCargo Meta Boxes

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

	//Hide the "Shipment Details" meta box.
	remove_meta_box('wpc_add_meta_box', $screen->id, 'advanced');
	//Hide the "Shipment History" meta box.
	remove_meta_box('wpcargo_shipment_history', $screen->id, 'advanced');
}

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