Support » Plugin: WooCommerce Shipping & Tax » WooCommerece Shipping Label Purchase Problem

  • Resolved myacoub

    (@myacoub)


    Hi all,

    I have have recently installed a plugin called “Capabilities” that can create more roles so as i can create a special role that only handles WooCommerece orders. I have used the following link to accomplish this task.

    https://publishpress.com/knowledge-base/woocommerce-users-only-edit-orders/

    After assigning certain users to the new role, they complain that they can no more purchase the shipping labels!! The error that pops up says, “Sorry, you are not allowed to do that!”.

    When i switch those users back to the “shop manager” role, now they can buy the labels but then they have more permissions than what i want them to see!

    Here is what i have got from the plugin developers

    Thanks for using PublishPress Capabilities.
    
    This will require you look into the plugin you’re using for shipping labels.
    
    It may not allow users in some roles to access it. Or it may offer capabilities
    that you can add to your new role.
    
    Check the documentation, or contact that plugin’s developer.

    Any guidance will be appreciated.

    Mouhab

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter myacoub

    (@myacoub)

    Any luck that somebody addresses this issue??

    Plugin Author frosso1 (a11n)

    (@frosso1)

    Hi Mouhab,

    Thanks for reaching out!

    I don’t have access to the PublishPress Capabilities plugin, so I’m not currently able to reproduce this.
    Can you please share with me a screenshot of the error, including the URL where the error appears?
    I understand that this might be happening on any order page, you can also obfuscate the domain from the URL if you desire.

    You can use Droplr or CloudApp to share the image.

    Thank you!

    Francesco

    Thread Starter myacoub

    (@myacoub)

    Hello frosso1 (@frosso1)

    Thanks for the helping hands here..

    I have uploaded a screen shot of what i am getting to my Google drive and i opened it for public share.

    The link is –> https://drive.google.com/file/d/1xFvIb7nNQTWOvLNCe0fvlfU5tbpQP8QW/view?usp=sharing

    The steps i follow are:

    1- Click on “create shipping label”
    2- Select “package details”
    3- Click on “Use this packges”

    Then i get that error. Hope this will help and guide you.

    Mouhab

    Thread Starter myacoub

    (@myacoub)

    sorry, forgot to write the URL on which the error happens. It is,

    https://recreational8.com/wp-admin/post.php?post=8862&action=edit

    Plugin Author frosso1 (a11n)

    (@frosso1)

    Hi Mouhab,

    Thanks for all the information, that’s really helpful!

    It looks like the plugin you’re using is assigning the edit_shop_orders permission to the users, but not the manage_woocommerce permission.
    I was able to reproduce what you’re describing. With the manage_woocommerce permission, users have the ability to change WooCommerce settings. With the edit_shop_orders permission and without the manage_woocommerce permission, users have the ability to see the order page and open the “create shipping label” modal, but they can’t really use the plugin’s functionality.

    The manage_woocommerce permission is the permission that WooCommerce Shipping & Tax uses to ensure users have the ability to purchase and print shipping labels in the order page.
    It looks like there’s some inconsistency in our plugin, because the user you’re using has the edit_shop_orders permission and they can see the “Create shipping label” modal. But once the modal opens they can’t print any labels.

    The plugin is currently using the manage_woocommerce permission because through the “create shipping label” modal it’s also possible to create custom packages, which are stored in the WooCommerce settings: https://d.pr/i/BwI9CN .

    We’re now discussing within the team whether we should allow users with the edit_shop_orders permissions to print labels (and therefore manage the packages in the settings, without accessing the settings page).

    I will get back to you within the next couple of days with an answer on that.

    In the meantime, thanks for your patience while we get an answer!
    Have a good rest of your day!

    Francesco

    Thread Starter myacoub

    (@myacoub)

    Dear Francesco frosso1 (@frosso1),

    Thank you so much for that reply. I am really glad that my finding got your interest and the whole team. I hope we can add a capability that solves this issue.

    Will wait for your coming notification; hope it will be good news for me.

    Mouhab

    Plugin Author frosso1 (a11n)

    (@frosso1)

    Hi @myacoub ,

    Thanks for your feedback on this!
    This thread helped uncover some inconsistency with the permissions structure we’re leveraging. Users that can see the “Orders” page should not necessarily also manage printing labels. In the “create shipping label” modal, a user could also manage shipping packages, which are a setting for the plugin. The plugin’s settings should be managed by users with the manage_woocommerce permission.

    I created a ticket that you can follow, if you’d like: https://github.com/Automattic/woocommerce-services/issues/2433

    When the ticket is resolved, we’ll ensure that only users with the manage_woocommerce or the wcship_manage_labels permissions can print labels.
    The wcship_manage_labels doesn’t currently exist, it’s just something that will help other people in your similar position, as an additional feature of the plugin.

    In the meantime, as a temporary solution if you have access to your server and you need this urgently, you could ask a developer to change these 2 lines in the plugin to check for a different capability type, like edit_shop_orders (instead of manage_woocommerce).
    That’s just a temporary solution for your own site tho, so I wouldn’t recommend keeping it there after a fix is deployed 🙂

    /classes/class-wc-rest-connect-base-controller.php – Line 152
    /classes/class-wc-rest-connect-address-normalization-controller.php – Line 65

    I hope this helps!

    Have a great weekend!

    Francesco

    • This reply was modified 5 months, 2 weeks ago by frosso1 (a11n). Reason: wording
    Thread Starter myacoub

    (@myacoub)

    Francesco,

    Guys, “YOU ARE THE BEST”.

    If you needed my assistance to test anything, please feel free to engage me. I am always online and usually respond in 10-15 min.

    Again, Thank you guys for the quick response and i am glad that i am participating in improving the ever famous plugin.

    Mouhab

    Plugin Support Shohan Hossain Nabil – a11n

    (@sohanhossain)

    Hello @myacoub,

    You are very welcome. Please keep following the issue here: https://github.com/Automattic/woocommerce-services/issues/2433. You can also comment on the issue if needed.

    Thank you for your interest in helping us improve the plugin!

    Plugin Author frosso1 (a11n)

    (@frosso1)

    Hi @myacoub ,

    I wanted to reach out with an update – a few days ago a new version of the plugin has been released. If you’d like, you can now assign the wcship_manage_labels capability to the users that you want to allow to print labels.
    Please also ensure that the users have the edit_shop_orders permission.
    If the wcship_manage_labels doesn’t exist on your site, you can create it through the Capabilities plugin and assign it to the users.

    Thank you!

    Francesco

    Thread Starter myacoub

    (@myacoub)

    Hello Francesco (a11n) (@frosso1),

    Many many thanks for you guys. Always the best. I will do as you said and see the outcome and will let you know the results.

    Mouhab

Viewing 11 replies - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.