How to update or delete default menu items on the Front-end Manager dashboard sidebar?

To remove default menu items added by other add-ons, copy code below on your functions.php child theme file.

/* How to remove  Order menu Front-end Manager sidebar menu  */
add_filter( 'wpcfe_after_sidebar_menu_items', 'remove_sidebar_menu_item' );
function remove_sidebar_menu_item($menu_items){
	//Remove Order menu
	unset($menu_items['orders-menu']);
	return $menu_items;
}
<h3>How to remove Import/Export menu add-on in WPCargo_Client user role in Front-end Manager sidebar menu </h3>
/*remove Import/Export menu*/
add_action( 'wp_head', 'remove_wpcie_sidebar_menu' );
function remove_wpcie_sidebar_menu(){
	//Remove menu on all roles
	remove_filter('wpcfe_after_sidebar_menus', 'wpcie_import_export_sidebar_menu', 10, 1 );
	
	//Remove menu from certain role
	$user_id = get_current_user_id();
	$user_role = wpcfe_current_user_role();
	if( in_array( 'wpcargo_client', $user_role ) ){
	remove_filter('wpcfe_after_sidebar_menus', 'wpcie_import_export_sidebar_menu', 10, 1 );
	}
}
<h3>How to remove Receiver/Barcode menu add-on in WPCargo_Client user role in Front-end Manager sidebar menu </h3>
/* Receiver add-on */
add_action( 'wp_head', 'remove_wpcr_sidebar_menu' );
function remove_wpcr_sidebar_menu(){
	//Remove menu on all roles
	remove_filter( 'wpcfe_after_sidebar_menu_items', 'wpcr_sidebar_menu_items' );
	
	//Remove menu from certain role
	$user_id = get_current_user_id();
	$user_role = wpcfe_current_user_role();
	if( in_array( 'wpcargo_client', $user_role ) ){
	remove_filter( 'wpcfe_after_sidebar_menu_items', 'wpcr_sidebar_menu_items' );
	}
}

To remove default Add Shipment items added by other add-ons, copy code below on your functions.php child theme file.

//Remove Add Parcel and Add Quotation from menu
add_action( 'after_setup_theme', 'remove_menu_items_callback' );
function remove_menu_items_callback(){
	//Remove Shipping Rate Add Shipment menu
	remove_action( 'wpcfe_after_add_shipment', 'wpcsr_menu_items_callback' );
	//Remove Parcel Quotation Add Shipment menu
	remove_action( 'wpcfe_after_add_shipment', 'wpcpq_menu_items_callback' );
}

 


function wpccustom_remove_sidebar_menus($menu_items){
    // remove Containers menu
    unset($menu_items['wpcsc-menu']);

    // remove Address book menu
    unset($menu_items['address-book-menu']);
    return $menu_items;
}
add_filter('wpcfe_after_sidebar_menus', 'wpccustom_remove_sidebar_menus', 15, 1);

0
    0
    Your Cart
    Your cart is emptyReturn to Shop