Home Forums Theme Support Dokan Remove tab dashboard

This topic is: resolved

This topic contains 3 replies, has 3 voices, and was last updated by  towhid 4 years, 4 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #32881

    Federica Canton
    Member
    Post count: 10

    Hello, i use this code to remove some tab form dashboard

    function dokan_remove_coupon_menu( $menus ) {
        unset($menus['coupon']);
    	unset($menus['reviews']);
    	unset($menus['withdraw']);
    	unset($menus['orders']);
    	unset($menus['reports']);
         
        return $menus;
    }
     
    add_filter( 'dokan_get_dashboard_nav', 'dokan_remove_coupon_menu' );

    Function with all tab but not with orders and reports. I need to show only products tab in dashboard. Why not function? How can i do?

    Thanks

    #32884

    towhid
    Participant
    Post count: 4505

    Hello Federica,
    Can you try with this code and let me know the result.

    function dokan_remove_coupon_menu( $menus ) {
        unset($menus['coupon']);
        unset($menus['reviews']);
        unset($menus['withdraw']);
        unset($menus['order']);
        unset($menus['report']);
         
        return $menus;
    }
    
     
    add_filter( 'dokan_get_dashboard_nav', 'dokan_remove_coupon_menu' );

    Thank You ๐Ÿ™‚

    #33112

    Ji Yu
    Member
    Post count: 37

    where can I find this PHP file? thanks!

    #33128

    towhid
    Participant
    Post count: 4505

    Hello Ji Yu,

    I have just edited a little bit of your code. I have tested the code myself and worked for me. So you can use the code I have provided. Better you can use a child theme and put this code block in your functions.php file and let me know the result.

    Thank You ๐Ÿ™‚

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Remove tab dashboard’ is closed to new replies.