Go to WooCommerce > Settings > Members Only in your dashboard.
If you select ‘Password’ from the ‘Restriction Method’ field, you’ll see a couple of extra fields appear:
You can enter one or more passwords in the ‘Passwords’ field. Just hit enter between each password so that they appear on a separate line each.
Creating a password form
The easiest way to create a password page and form on the front end is to ensure that you have selected ‘Password’ from ‘Restriction Method’ then click ‘Save changes’. You’ll see a notification to automatically create a page:
Just click ‘Yes, please create a page for the password form’ and the plugin will automatically create a page in the front of your site – and embed the password form in the page too.