Public Ticket #4562571

Access to panels allowed by default

Closed
Comments
7 Tickets 1
Tabard started the conversation 5 months ago on May 4, 2026 at 12:35pm

Hi,

When adding a team member to the store, can they be automatically granted access to all dashboard panels?

This would prevent the access restriction message if the administrator forgets to activate the panels in the member's settings.

Thank you in advance for your response

2,762
KingsPlugins replied 5 months ago on May 7, 2026 at 7:49pm

Hi Tabard,

Thanks for reaching out. You can achieve this with a small code snippet. Please add the following to your theme's functions.php or any code snippets plugin:

add_action('marketking_after_member_created', 'mk_grant_all_panels_to_new_member', 10, 3);
function mk_grant_all_panels_to_new_member($user_id, $parent_agent_id, $parentaggroup) {
    if (!function_exists('marketkingpro')) {
        return;
    }

    $panels = marketkingpro()->get_all_vendor_available_dashboard_panels();

    foreach ($panels as $panel_slug => $panel_name) {
        update_user_meta($user_id, 'marketking_teammember_available_panel_' . $panel_slug, 1);
    }
}

This will automatically grant access to all available dashboard panels whenever a new team member is created.

Let me know if you run into any issues,

Kind regards,
Stefan

Sign In