Several PublishPress customers have asked us if it's possible to customize the WooCommerce Order screens. You can can see an example of an Order in the screenshot below.
To follow this tutorial, make sure you have both WooCommerce and also PublishPress Capabilities Pro installed.
- Go to “Capabilities” in your WordPress admin area, then “Settings”.
- Click the “Editor Features” tab.
- Check the box “Support for Private Post Types”.
- Click “Save Changes”.
- Go to “Capabilities” in your WordPress admin menu, then “Editor Features”.
- In the top-left corner, choose the user role you want to edit.
- Click the “Order” tab on the left side of the screen.
- Click the “Classic” tab on the top of the screen.
Many of the most important elements for WooCommerce Orders are in the “Metaboxes” area. In this screenshot, I'm disabling the “Order Actions” area:
If I save the setting above, any user in the role I've chosen will not be able to see or use the “Order Actions” area which is normally in the right sidebar:
Let's take a look at another example. This time we'll be using an option in Editor Feature that allows you to hide specific elements in the WordPress admin using CSS.
- Go back on the “Editor Features” screen.
- Scroll down to the Custom Classic Editor Items.
.editaddressfor the “Element IDs or Classes” box.
Now when this user goes to edit an order, the pencil icons will be missing. A user in this role will not be able to edit the Billing or Shipping details for any order.
If you want more ways to control access to WooCommerce Orders, check out our guide to managing permissions for WooCommerce Orders. There are also specific tutorials such as creating WooCommerce users who can only view and edit orders, or allowing some users to accept payments on orders on behalf of your customers.