password protect

Hi Guys. I have a volunteer helping me with some of the small issues we are having with our training site. We have been having on going problems with password protecting on of our three courses, it's the only one where a min standard is required and this has to be checked before access to the course via a coupon number can be given.
This is what she says: Hi All,
Not sure if this works the way it should. When I go (incognito) to https://courses.abm.support/ and click ‘add to basket’ nothing goes in my basket and I’m not asked for a password to use the coupon.

Clicking on the ‘add to basket’ takes you to the actual course page details https://courses.abm.support/courses/abm-mother-supporter-module/ where the content says ‘Thank you for applying for ABM Mother Supporter training. We are pleased to accept you for training as a Mother Supporter. We wish you all the best with your training and hope you enjoy completing it.’ and then the button ‘enrol now!’

From what I can gather putting the product to ‘password protected’ means that you can’t add it to the basket at all.
If I create a user account within wordpress I then become a ‘subscriber’ and I then are greeted with the ‘passcode required to enrol’ part but even putting the actual passcode set up in coursepress of mothersupportpass still gives me no joy.

We need to look at how the products are linked because it all is a bit confusing with the ‘enrol code’ and the ‘coupon code’ and the now added ‘password code’ which actually seems to be impossible to enter.

  • Adam Czajczyk

    Hello Gavin

    I hope you're well today and thank you for your question!

    I'm not exactly sure about the current configuration of WooCommerce+CoursePress on your site because there's a mention of "putting a product to password protected" but also about course passcode.

    With a standard setup with e.g. free course (leaving WooCommerce and paid courses apart for a second) this is how "password protection" of a course should be working:

    - when editing course in "Step 6 - Enrollment & Course Cost" section, you set "Any registered users with a pass code" option for "Enrollment Restrictions and define "Course Passcode" below

    - when a logged in user enters the course page, there should be a "Passcode Required" form instead of "Enroll" button where the user puts that code and that should let him/her enroll in a course

    - when a logged out user enters the course page, there is an "Enroll" button which triggers login/register form first - the plugin cannot know whether this logged in person does know the passcode or not; after logging in/registration the "Passcode Requred" form should appear.

    Now, if you add WooCommerce to the equation and the course is paid:

    - standard setting of CoursePress is to redirect from "course product page" to course "parent" page (the original course page) where - if the user is logged in already, they should then get option to add to basket, so:

    user clicks on add to basket on product page -> is taken to course page -> is asked to login/register -> gets add to basket link again -> adds course to basket -> makes payment -> becomes a student

    with course protected by passcode that would be

    user clicks on add to basket on product page -> is taken to course page -> is asked to login/register -> needs to provide passcode -> gets add to basket link again -> adds course to basket -> makes payment -> becomes a student

    This might be a bit confusing indeed. There's an option in CoursePress settings to disable "product to course page" redirect: on "CoursePress Pro -> Settings -> WooCommerce" page look for "Redirect WooCommerce product post to a parent course post" option and uncheck it. With this option disabled the "flow" should be like this:

    user visits course product -> clicks "add to basket" -> product is added to baskte -> [user can do more shopping optionally] -> user goes to checkout and completes transaction -> user can go to his/her student dashboard and should see the course but still should be required to provide pass code

    Please note: in this case WooCommerce must require user to login to checkout, it cannot allow guest checkout as with guest checkout course may not be properly assigned to the user.

    Having that said, I admit I'm not quite sure how relevant that is to your setup as I don't know current configuration. Would you mind enabling support access to the site so I could take a look at it and check it? To do this, please go to the "WPMU DEV -> Support" page in your site's back-end and click on "Grant support access" button.

    Let me know when it's activated and I'll access your site and check this.

    Best regards,
    Adam