😟 Sorry, we’re closed
View Categories

Managing WordPress and WooCommerce User Roles and Capabilities

2 min read

WordPress and WooCommerce come with predefined roles that determine the actions a user can or cannot perform. Knowing these roles ensures your site’s safety and functionality.

1. Understanding Default WordPress User Roles #

  • Administrator: Has access to all administrative features.
  • Editor: Can manage and publish posts, including the posts of other users.
  • Author: Can publish and manage their own posts.
  • Contributor: Can write and manage their own posts but cannot publish them.
  • Subscriber: Can only manage their profile.

2. WooCommerce User Roles #

Upon installing WooCommerce, the following roles get added:

  • Shop Manager: Has access to most of the WooCommerce-related capabilities, including order management, product creation, and viewing reports.
  • Customer: A user who has made a purchase or created an account during the checkout process. They can view past orders and manage their personal details.

3. Adding a New User #

  1. Navigate to your dashboard and go to Users > Add New.
  2. Fill in the required user info (username, email, etc.).
  3. Select the desired role from the dropdown.
  4. Click “Add New User”.

4. Editing User Roles #

  1. Go to Users in the dashboard.
  2. Hover over a user’s name and click “Edit”.
  3. Scroll down to the “Role” dropdown to change their role.
  4. Click “Update User”.

5. Custom User Roles #

For more specific control:

  • Using a Plugin: Plugins like User Role Editor or Members let you create custom roles and modify capabilities.
  • Manually with Code: This requires PHP knowledge. Use the add_role() function to create a new role, and then assign capabilities with add_cap().

6. Important Considerations #

  • Limited Admin Access: Only give the Administrator or Shop Manager role to trusted users.
  • Capability vs. Role: A role is a set of capabilities. A capability is a specific action, like ‘publish_posts’ or ‘manage_woocommerce’.

7. Removing Roles #

If you don’t need specific roles, remove them via plugins or the remove_role() function.

8. Resetting Roles #

Some plugins, like User Role Editor, can reset roles to default settings.

Give us a call

Available from 8am to 6pm, Monday to Friday.

02392 982212
Send us a message

Send your message any time you want.

Whatsapp us!
Our usual reply time: Up to 30 minute(s)
Facebook Message us!
Our usual reply time: Up to 1 Hour(s)