Created
July 5, 2021 20:35
-
-
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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