How to View But Not Edit WooCommerce Orders

We had an interesting request from a PublishPress user this week. They wanted to allow a WordPress user to view WooCommerce orders, but they did not want this user to be able to edit the orders.

Normally there are two roles in WooCommerce called “Shop Manager” and “Customer“. In order to solve this request, we need to add an additional role.

We can do this using the PublishPress plugins, and in this guide we'll show you how to set this up.

  • Install the PublishPress Capabilities Pro plugin.
  • Go to “Capabilities” then “Roles” in your WordPress admin area.
  • Click “Copy” under the “Contributor” role. We're choosing this because it's a basic role with very limited permissions and is very similar to the new role we want to create.
Contributor Copy in WordPress
Contrib Copy
  • Give a name to the new role. In this example, we'll name this user role “Order Viewer”.
  • Click “Create Role”.
Order Viewer in WooCommerce
Order Viewer

Next you should set the capabilities for this new role.

  • Go to “Capabilities” in your WordPress admin menu.
  • Choose the new user role you just created in the top-left corner.
  • Set up their capabilities, as in the screenshot below. The key boxes to check are “Edit” for Posts and “Edit” for Orders.
Edit Posts Order in WooCommerce
Edit Posts Order

In the previous step, if will probably seem confusing that we granted editing access to the users. However, this step was essential in order to grant access to the main “Orders” screen. Next, we can block some of that access that we've just granted.

In that previous step we gave users in the “Order viewer” role the ability to use “Edit” for Posts. If you don't want users to edit posts, here is what to do next:

  • Go to “Capabilities” then “Admin Menus” in your WordPress admin menu.
  • Choose the new user role you created, in our case “Order Viewer,” in the top-left corner.
  • Check the box for “Posts” so that this user will not be able to edit any Posts.
Block Posts Menu in WooCommerce
Block Posts Menu

Now you can add a user to your new “Order Viewer” role and test what they can see. You can use the “User Testing” feature in PublishPress Capabilities for this. If you log in to your WordPress site as an “Order Viewer”, this screenshot below shows what the user will see. They will be able to view the order, but they will not be able to edit it. If the user tries to edit the order, they will see the message, “Sorry, you are not allowed to edit this item.”

View Order Only
View Order Only

Users will be able to click on the eye icon in the center of the screenshot above. This will give them a modal window with all the details of the order.

Congratulations! Now you have successfully created a user role that can view but not edit WooCommerce orders.

Preview Order Modal
Preview Order Modal

WooCommerce and PublishPress Summary

WooCommerce and the PublishPress plugins are a powerful combination. You can configure the permissions on your eCommerce store to meet your exact needs.

Other examples include controlling who can manage WooCommerce coupons, creating users who can only manage WooCommerce orders, adding users who can only manage reports, and having users who can only edit products.

You can also use our plugins to clean up the WooCommerce admin screens.

PublishPress Permissions icon
PublishPress Capabilities icon
  • Steve is the founder of PublishPress. He's been working with open source software for over 20 years. Originally from the UK, he now lives in Sarasota in the USA. This profile is generated by the PublishPress Authors plugin.

4 Comments

  1. Guys, this doesn’t work anymore because the popup that is triggered by Preview eye icon now has Edit order options, which means the user can edit the order when we just wanted them to be able to view it.

  2. Thanks for letting us know, Percy. This is requires a Capabilities Pro feature. Could you open a support ticket and share what you’re seeing? We’ll update this guide with another fix.

  3. Is there a way to achieve this with the ability to see order comments, but not modify orders?

    Thanks for a great plugin!

    1. Hi Jason. That might be difficult unfortunately because of the WooCommerce UI. If you could display the order comments outside of the normal order editing screen, it would be possible.

Leave a Reply to Steve Burge Cancel reply

Your email address will not be published. Required fields are marked *