I have added this filter to add a custom menu and URL but it is just showing the number of requests submitted by a user on the user dashboard but not in the receiver dashboard.
I am stuck here and need help.
Thanks!
add_filter(
'hivepress/v1/menus/user_account',
function ( $menu ) {
if ( is_user_logged_in() ) {
if ( hivepress()->request->get_context( 'request_count' ) >= 0 ) {
$item_args = [
'label' => 'Requests',
'url' => home_url().'/request',
'_order' => 123,
];
$item_meta = hivepress()->request->get_context( 'request_count' );
if ( $item_meta ) {
$item_args['meta'] = $item_meta;
}
$menu['items']['requests_edit'] = $item_args;
}
}
return $menu;
},
1000
);