1. Home
  2. Knowledge Base
  3. WooCommerce Members Only
  4. Getting Started with Members Only
  5. Restrict individual products by user role, user ID or password
  1. Home
  2. Knowledge Base
  3. WooCommerce Members Only
  4. Restrict individual products by user role, user ID or password

Restrict individual products by user role, user ID or password

To protect individual products from general view so that only specified users can access them:

  • Edit the product
  • In the Members Only panel, choose ‘By User’, ‘By User Role’, or ‘Password’
product restriction methods
  • If you choose ‘By User’, enter a comma-separated list of the IDs of the users who are permitted to view this product
protect product by user id
  • If you choose ‘Password’, enter the permitted passwords for this product
protect product by password

Check out this blog post for more information on creating client-specific products.

Set an expiry date on membership

If you are assigning user roles to customers who buy certain products, you might want to set an expiry date for the user roles. So, after a specific time, the role will be automatically removed from the user (unless they purchase the product again).

To do this, edit your product and click on the ‘Members Only’ tab. In the ‘Expires After’ field, set the duration of the roles in either days, weeks, months or years.

membership expiration date

Was this article helpful?

Related Articles