• Hi,

    Is there a way of changing which back end users may see, create and update gift cards?

    Currently it seems that only a site administrator or global admin may do so.

    WooCommerce introduces the user role of “Shop Manager” which, by default, has all permissions to deal with the shop and money, but not to do things which may break the site like changing themes and plugins.

    It would seem that this role is better suited to viewing, creating and updating gift cards than the global admin.

    I am reluctant to give shop staff global admin access, but equally don’t want admins tied up doing basic tasks like creating gift cards.

    Alternatively if one or more bespoke capabilities were used then one may allocate such permissions to any role or user using an appropriate RBAC plugin.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter yknivag

    (@yknivag)

    A little further investigation reveals that the plugin uses the “manage_options” capability, which seems a perfectly reasonable one to choose for the options screen, but wouldn’t the ability to create, view and update the gift cards themselves be better aligned to the WooCommerce “publish_product” capability?

    I shouldn’t need to give a shop manager the ability to customise themes just so they can create a gift card.

    • This reply was modified 4 years, 3 months ago by yknivag.
    Plugin Author YITHEMES

    (@yithemes)

    Hi there,
    hope you are doing well! ??

    We have added a new filter in the plugin to allow the changes of the capability to access the plugin settings and manage the gift cards.

    Could you update the plugin to the latest version (2.0.5) and add the next code in the functions.php of your active theme, replacing the actual capability with the one you want, please?

    if(!function_exists('yith_wcgc_plugin_settings_capability_shop_manager')) {
     function yith_wcgc_plugin_settings_capability_shop_manager( $capability ){
     $capability = 'manage_options';
     return $capability;
     }
        add_filter('yith_wcgc_plugin_settings_capability','yith_wcgc_plugin_settings_capability_shop_manager');
    }

    Let us know any news.

    Have a nice day!

    wasabi_flagg

    (@wasabi_flagg)

    I tried by copying and pasting your code in the functions.php but the shop manager can’t seee the YITH -> Gift Cards menu

    Hi —

    I also have this same request. We need Shop Managers to be able to manage gift cards. I also added this code and I can confirm that the Shop Manager cannot see the YITH -> Gift Cards menu. Is there a solution for this?

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Admin Permissions’ is closed to new replies.