Public Ticket #3218664

Hide coupon

Closed
Comments
2,762
KingsPlugins replied 4 years ago on January 29, 2023 at 6:41am

Hi there,

Yes, to do that please add this PHP code snippet to your site:

add_filter('salesking_dashboard_menu', function($menu_items){
    $user_id = get_current_user_id();
    $agent_group = get_user_meta($user_id,'salesking_group', true);
    if ($agent_group == 1234 or $agent_group == 4567){
        unset($menu_items['coupons']);
        unset($menu_items['team']);
    }
    return $menu_items;
}, 10, 1);

You would need to replace 1234 with the ID of your agent group that you want those hidden for. To get the ID of a group, go to SalesKing -> Agent Groups and click on the group. The number in the URL such as ?post=123 is the ID.

The above code removes those panels for groups 1234 and 4567.

A PHP snippet can be added to functions.php, or by following our guide here: https://b2bkingplugin.com/docs/how-to-add-a-snippet-php-or-js/

Kind regards,

Stefan

Sign In