• Resolved nonchiedercilaparola

    (@nonchiedercilaparola)


    Hi, i’m try to get shop_manager capability to export user so i insert this code into function.php but doesn’t work:

    `add_filter(‘wt_’. WT_IEW_PLUGIN_ID_BASIC .’_alter_role_access_basic’, ‘add_additional_user_role’, 10, 1);

    function add_additional_user_role($roles) {

    array_push($roles, ‘manage_woocommerce’);

    return $roles;

    }’

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author WebToffee

    (@webtoffee)

    Hi @nonchiedercilaparola,

    We will check it and get back to you.

    Plugin Author WebToffee

    (@webtoffee)

    Hi @nonchiedercilaparola,

    Please use the below snippet to grant export/import permission for shop manager. You may please copy the snippet in the active theme’s functions.php file and then hard refresh(Ctrl/Cmd + Shift +R) and then try.

    add_filter('wt_iew_allowed_screens_basic', 'wt_iew_add_cap_to_role');
    function wt_iew_add_cap_to_role($screen) {
        $user = wp_get_current_user();
        $roles = (array) $user->roles;
        foreach ($roles as $key => $role) {
            if ($role == 'shop_manager') {
                $role_object = get_role('shop_manager');
                $role_object->add_cap('manage_options');
            }
        }
        return $screen;
    }
    Thread Starter nonchiedercilaparola

    (@nonchiedercilaparola)

    Thanks for reply! last question, i need to export also custom form field created with B2BKing plugin. Do I need pro version? is it right?

    Plugin Author WebToffee

    (@webtoffee)

    Hi @nonchiedercilaparola,

    Yes, importing and exporting custom fields is one of our premium features. Please have a look at the pro version of the plugin to have that feature.

    Thread Starter nonchiedercilaparola

    (@nonchiedercilaparola)

    i need that shop manager be able to export and not import. with pro is it possible?

    Plugin Author WebToffee

    (@webtoffee)

    Hi @nonchiedercilaparola,

    Yes, you can export and import using the shop manager role.

    Thread Starter nonchiedercilaparola

    (@nonchiedercilaparola)

    sorry,there’s a misunderstanding, i need that shop manager can only export.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Export-Import user capability for shop manager’ is closed to new replies.