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.
- Go to “Roles” and copy the Subscriber role
- Name your role as “Product category manager” and click “Create 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.
- Go to “Capabilities” menu and click “Woocoommerce” tab.
- Enter “view_admin_dashboard”.
- Click “Save Change”.
- 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.
- 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.
- Repeat this for the box “Permissions: Edit Products in this Category”.
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.