• Resolved edge24ema

    (@edge24ema)


    Hello!

    Is it possible to give access to the UpdraftPlus plugin to a Shop Manager role?

    I installed the User Role Editor plugin but I didn’t find the “manage_options” and “updraftplus_backup” options in the list of capabilities…

    Thanks

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor bcrodua

    (@bcrodua)

    Hi,

    ‘option_page_capability_updraft-options-group’ is a filter used in UpdraftPlus. A detailed explanation of WordPress filters can be found here.

    To use this filter, you will need to add a PHP script to your site, such as the one below:

    <?php
    add_filter ( ‘option_page_capability_updraft-options-group’, ‘custom_ud_role_filter’, 10, 1);

    function custom_ud_role_filter($role) {
    return ”;
    }

    (replacing with a user capability belonging to the role you wish to give access to. A full list can be found here.)
    This can be added as a .php file to a ‘wp-content/mu-plugins/’ directory on your site (you may have to create this directory).

    Thanks,
    Bryle

    Thread Starter edge24ema

    (@edge24ema)

    Hi @bcrodua

    Is this the best way to give access to the shop manager role or is there a better/simplest way to do it?

    Because it’s was a solution that I found online but then I didn’t find that option to check, so I’m open to other solutions if you have another one as plug-in contributor.

    thanks

    Thread Starter edge24ema

    (@edge24ema)

    Hi @bcrodua,

    I tried your way but it didn’t work…

    I added the following .php file to a ‘wp-content/mu-plugins/’ directory on my site:

    <?php
    add_filter('option_page_capability_updraft-options-group', 'custom_ud_role_filter', 10, 1); function custom_ud_role_filter($role) {
    return 'edit_shop_orders';
    }

    I tried also this:

    <?php
    add_filter('option_page_capability_updraft-options-group', 'custom_ud_role_filter', 10, 1); function custom_ud_role_filter($role) {
    return 'manage_options';
    }

    but nothing… even if I made the plugin appear in the Shop Manager sidebar, all buttons are not working. Like if you press the blue backup button, nothing happens.

    Plugin Contributor bcrodua

    (@bcrodua)

    Hi,

    Sorry, can you try another option?

    Try using the User Role Editor. Here are the steps to give access to UpdraftPlus to a Shop Manager role

    1. Install and activate the User Role Editor plugin.
    2. Go to Users -> User Role Editor in the WordPress dashboard.
    3. Select the “Shop Manager” role from the list of roles.
    4. Scroll down to the “Plugins” section and find “UpdraftPlus – Backup/Restore” in the list of plugins.
    5. Check the box next to “Activate plugins” to give the Shop Manager role permission to activate and deactivate UpdraftPlus.
    6. Check the box next to “Access UpdraftPlus” to give the Shop Manager role permission to access the UpdraftPlus settings and perform backup and restore operations.
    7. Click the “Update” button to save the changes.

    Thanks,
    Bryle

    Thread Starter edge24ema

    (@edge24ema)

    Hi @bcrodua

    there is not a “Plugins” section in User Role Editor with the list of all installed plugins.

    Plugin Support vupdraft

    (@vupdraft)

    Shop Manager is a role you can give someone to manage the shop without making them an Admin. They have all the rights a customer has, and are granted the main capabilities:

    • manage_woocommerce: Gives shop managers the option to manage all settings within WooCommerce, and create/edit products.
    • view_woocommerce_reports: Gives them access to all WooCommerce reports.

    The Shop Manager role has all the capabilities listed at our WooCommerce GitHub repo.

    They also have general WordPress editor capabilities.

    Tweaking capabilities

    If you wish to modify roles and capabilities, use a third-party plugin such as:

    Plugin Author David Anderson

    (@davidanderson)

    Anyone to whom you give access to a backup/restore plugin, has become a de facto administrator of your site. If they can backup and restore the site database, then they can do anything.

    For example, they can backup the database, download it to their computer, edit it to make themselves an admin, upload it, and restore it.

    So really, if you want them to have access to a backup/restore plugin, it makes sense just to make them an admin anyway.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Give access to Shop Manager role to UpdraftPlus’ is closed to new replies.