CoursePress Pro Bug - Prerequisite Course check fails

I set a course to have a prerequisite class. When setting up a demo user to test, I found that my course that had a prerequisite was still showing "Sign Up" instead of "Prerequisite Required". I looked in the class.shortcode.php file and found that the check occurs if a student is logged in.

} elseif ( 'prerequisite' == $course->enroll_type ) {
$button .= '<span class="apply-button apply-button-prerequisite ' . $class . '">' . $prerequisite_text . '</span>';
// cp_write_log( 'TWELVE');

I copied the code and placed it between "Four" and "Five" in the first part that begins checking as a hotfix and everything seems to be working great now.

  • aristath
    • Recruit

    Hello there @Bryan, I hope you're well today!

    I just confirmed this on my own installation, you're absolutely right!
    I have notified the plugin developer about this, we should have that fixed ASAP.

    Thank you for reporting this and for taking the time to debug it... I just sent some rep points your way. :slight_smile:


  • Bryan
    • Site Builder, Child of Zeus

    I was just informed by one of our testers that this appears to be an issue again. I am using version They also noted that it appears that they are automatically enrolled in all of the courses within their membership (Membership 2 Plugin) automatically. I have looked in the class.shortcode.php file and noticed that the verification method has changed, so I am not sure if it has anything to do with it. Thoughts?

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.