WooCommerce Users Can Edit Products Only in Some Categories

A PublishPress customer had this WooCommerce question for us:

I want to create a “Product category manager” for my website. This person will only be able to control the products in one category called “Fashion”. Is this possible with your plugins?

Yes, you can do this with the PublishPress Permissions plugin.

Video guide #

Text and screenshot guide #

In this guide, we will create a “Product Category Manager” user role.

  • Install PublishPress Permissions and also the PublishPress Capabilities plugin.
  • Go to “Capabilities” in your WordPress admin menu.
  • Using the dropdown in the top-left corner, choose “Subscriber”. We're going to copy the Subscriber role because it has very limited permissions.
  • Enter “Product Category Manager” into the “Copy Subscriber Role” box.
  • Click “Copy”.
New Woocommerce Role
New Woocommerce Role

We're now going to add a new permission to give Product Category Manager access to the WordPress admin area. Click here for more info on admin area access with WooCommerce.

  • Find the “Add Capability” box.
  • Enter “view_admin_dashboard”.
  • Click “Add to role”.
Creating a new permission for a user to access WooCommerce orders
  • Select the “view admin dashboard” box.
  • Click “Save Changes”.

Now it's time to create the user

  • Go to “Users” in your WordPress admin menu.
  • Create a user in the “Product Category Manager” role.
Category Manager
Category Manager
  • Go to “Products” then “Categories” in your WordPress admin menu.
  • Click “Edit” for the category you want to restrict.
  • Scroll down to the box “Permissions: Read Products in this Category”.
  • Set “Product Category Manager” to “Enabled” for both options.
Read Category Manager
Read Category Manager
  • Repeat this for the box “Permissions: Edit Products in this Category”.
Edit Category Manager
Edit Category Manager

Now you can test your user accounts. This is easier to do with the User Switching plugin installed.

This image below shows what the user will see. They will only be able to see the “Products” link in WooCommerce and products in their restricted category.

Fashion Category
Fashion Category

Professional publishing plugins for WordPress! Get PublishPress