Support » Plugin: WooCommerce » Protect a product by password

  • Hello,

    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 ?

    http://wordpress.org/extend/plugins/woocommerce/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Yes. When editing a product look in the right sidebar for the Publish box. In there click “edit” next to Visibility.

    Thread Starter aguidis

    (@aguidis)

    I already tried like I said 🙂 I don’t have any password form.

    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.

    Thread Starter aguidis

    (@aguidis)

    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 ?

    Thread Starter aguidis

    (@aguidis)

    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();
    }
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Protect a product by password’ is closed to new replies.