Home Forums Theme Support Dokan How to remove Coupon menu items from dashboard nav?

This topic is: resolved

Tagged: ,

This topic contains 5 replies, has 5 voices, and was last updated by  Nayem 4 years ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #20159

    Simon
    Member
    Post count: 58

    I don't want sellers to be able to add coupons. How can the coupon menu item be removed from the dahsboard nav — function dokan_get_dashboard_nav()?

    Maybe we can unset the item from the array?

    #20201

    Tareq Hasan
    Keymaster
    Post count: 2831

    Yes, just unset it.

    [php]
    function dokan_remove_coupon_menu( $menus ) {
    unset($menus[‘coupon']);

    return $menus;
    }

    add_filter( ‘dokan_get_dashboard_nav', ‘dokan_remove_coupon_menu' );
    [/php]

    #20248

    Simon
    Member
    Post count: 58

    Thank you Tareq!

    #42490

    hector
    Member
    Post count: 2

    Hello

    The file: dashboard-nav.php

    find the code:

    < ?php $home_url = home_url(); $active_class = ' class="active"' ?>

    < ?php echo dokan_dashboard_nav( $active_menu ); ?>

    how can i write the correct code to don´t show “Coupons” Label in Menu. ??

    Thanks.

    #43342

    Hjalte
    Member
    Post count: 1

    Can someone tell me where to put the code mentioned by Tareq above?

    I really need to remove “Coupons” and “Reviews” from the Dashboard.

    Thanks in advance !

    #43568

    Nayem
    Moderator
    Post count: 6480

    Hello Hjalte,

    I am really sorry for being late. You have posted in a resolved topic. You can put those code in your child theme's function.php file.

    The code should be like-

    function dokan_remove_coupon_menu( $menus ) {
    unset($menus['coupon']);
    
    return $menus;
    }
    
    add_filter( 'dokan_get_dashboard_nav', 'dokan_remove_coupon_menu' );
Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘How to remove Coupon menu items from dashboard nav?’ is closed to new replies.