• Resolved webeedoo

    (@webeedoo)


    Hello, I’ve just started to use the woocommerce mobile app for ios and it works perfectly fine. I have just one issue: I want to implement it companywide but i don’t want each user to see the shop stats.

    I’ve used User Role Editor plugin (by Vladimir Garagulya) and disabled the cappability “view_woocommerce_reports” for the role “shop manager”. As a result it worked ok in the wordpress dashboard (the user could edit orders but could’t see the shop reports) but unfortunately in the App the user couldn’t see reports but also couldn changa any order status.

    Is it possible to deal with this somehow? I need a user to have full permissions to edit orders statuses and add order comments but have no permission to see shop reports.

    Thanks in advance for any help,

    Adriana

Viewing 3 replies - 1 through 3 (of 3 total)
  • Saif

    (@babylon1999)

    Hello @webeedoo,

    Based on my testing, I was able to change the order status using a new WordPress.com account with a shop manager role. Therefore, I suspect that the issue may be related to the modified roles.


    Link to image: https://d.pr/i/LFNeiP

    The WooCommerce mobile app doesn’t really have room for customization so I recommend working with the Role Editor plugin to solve this.

    Alternatively, you can create your own WooCommerce app using the rest API or just use open the site dashboard from a mobile browser.

    Hope this helps!

    Thread Starter webeedoo

    (@webeedoo)

    Hello,

    thank you for your reply.

    I already tried the Role Editor plugin but it didn’t work the way I wanted. When I disable the user to see reports he can’t change order status as well.

    I need the user to change the order statuses but to not see the reports.

    do you have any other idea how to achieve this?

    Saif

    (@babylon1999)

    I need the user to change the order statuses but to not see the reports.


    The WooCommerce dashboard is pretty responsive on a mobile browser without the need for the app.

    That said, I tried digging deeper into this and found a WordPress filter to limit the user capabilities named user_has_cap .

    I removed the view_woocommerce_reports capability from the shop manager test user created in my previous response and I am no longer seeing the reports BUT I can still change the order status.


    Link to image: https://d.pr/i/hhAPZD

    add_filter( 'user_has_cap', 'disable_shop_manager_reports', 10, 3 );
    
    function disable_shop_manager_reports( $allcaps, $caps, $args ) {
    
        // check if the user has the shop manager role
        if ( isset( $allcaps['shop_manager']  ) ) {
        
            // remove the view_woocommerce_reports capability
            $allcaps['view_woocommerce_reports']=false; 
        }
    
        return $allcaps;
    }

    You can add the code above to your functions.php file or use a plugin like Code snippet.

    Make sure you remove anything added or removed by the role editing plugin.

    Also, please create a backup of your site before adding the snippet just in case things go wrong.

    Alternatively, you can add the snippet to a staging environment first. If your host doesn’t offer a staging solution, you can use WP-STAGING.


    Let us know how it goes!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Woocommerce mobile app – user permissions’ is closed to new replies.