Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ideadude/9ef271c4a1038b513599c7f2c995e6b1 to your computer and use it in GitHub Desktop.
Save ideadude/9ef271c4a1038b513599c7f2c995e6b1 to your computer and use it in GitHub Desktop.
Hide course content from non-members when using the default module of PMPro Courses.
/**
* Hide course content from non-members.
* By default, PMPro Courses allows non-members to see the "content" of a course.
* Lessons are still hidden. By setting this filter to false, non-members will
* see the restricted view on the single course page.
*/
add_filter( 'pmpro_courses_show_course_content_to_nonmembers', '__return_false' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment