Protect a product by password (6 posts)

  1. aguidis
    Posted 3 years ago #


    I'm working on an airsoft website that allows people to reserve matches. My client would like to set some private matches. Only accessible with a specific password.

    I try to set the visibility of my product : protected by password but it still accessible.

    Is there method to implement this kind of protection or a plugin maybe ?


  2. IgniteWoo Team
    Posted 3 years ago #

    Yes. When editing a product look in the right sidebar for the Publish box. In there click "edit" next to Visibility.

  3. aguidis
    Posted 3 years ago #

    I already tried like I said :) I don't have any password form.

  4. IgniteWoo Team
    Posted 3 years ago #

    Oh right, apologies. This is probably a theme issue. If you check it in a stock theme you'll see a password form if a product has a password. At least that's what I see when I test with TwentyEleven or WooThemes Canvas.

  5. aguidis
    Posted 3 years ago #

    Thank you for your reply. Indeed I think it's a theme issue : I created my own theme. I thought the function the_content() could handle each kind of visibility. So I have to inspect the TwentyEleven theme in order to get the good snippets ?

  6. aguidis
    Posted 3 years ago #

    I post what I found :

    I updated content-single-product.php and I put this condition :

    if ( !post_password_required() ) {
        // Display your product
    } else {
        echo get_the_password_form();

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic