The following actions and filter hooks are available in this Add On.
apply_filters( 'pmpro_courses_modules', $modules );
Add custom modules (other integrated course platforms) to the array of PMPro Courses modules.
apply_filters( 'pmpro_courses_course_redirect_to', null );
By default, the single course page is publicly accessible, regardless of its membership access settings. Use this filter to set a redirect URL to send non-members to when they visit the single course.
apply_filters( 'pmpro_courses_lesson_redirect_to', get_permalink( $post->post_parent ) );
By default, when non-members try to access a protected lesson in a course, they are redirected to the single course page. Use this filter to specify a custom URL for redirecting users who don’t have access to a lesson, rather than defaulting to the lesson’s parent course URL. The same filter runs when a visitor opens a lesson that hasn’t reached its release date, and for lessons in LearnDash, Tutor LMS, and Sensei LMS courses. Return an empty value to show the no-access message on the lesson page instead of redirecting.
apply_filters( 'pmpro_courses_get_courses_html', $temp_content, $courses );
Filter to allow custom code to modify the structure of the frontend courses list when displayed using the pmpro_courses_get_courses_html() function or via the [pmpro_all_courses] or [pmpro_my_courses] shortcode.
apply_filters( 'pmpro_courses_get_lessons_html', $temp_content, $course_id, $sections );
Filter to allow custom code to modify the structure of the frontend lessons list when displayed using the pmpro_courses_get_lessons_html() function (automatically added to the single course page and used by the [pmpro_course_outline] shortcode). $sections is the course outline: an array of sections, each with a section name and its lesson IDs.
apply_filters( 'pmpro_courses_show_course_content_to_nonmembers', true );
Optionally hide the full course content from non-members. By default, PMPro Courses will override PMPro to show the full course content, even to non-members (we see the single course page as a sales page for your course). Set this filter to false to change this behavior.
apply_filters( 'pmpro_has_membership_access_filter_pmpro_lesson', $hasaccess, $post, $user, $levels );
Filters membership access for individual lesson posts. This is a Paid Memberships Pro filter that the Add On uses three times: at priority 5 to give each lesson the same access as its course, at priority 10 for the Free Lesson setting, and at priority 20 to deny access to lessons that haven’t reached their release date. Return true to grant access. A callback at the default priority runs before the release date check, so an unreleased lesson stays locked.
do_action( 'pmpro_courses_module_settings', $module );
Fires inside the settings page UI for each active module. Use this to output custom settings fields when building a custom module integration.
do_action( 'pmpro_courses_settings_save' );
Fires when the Courses settings page is saved. Use this alongside pmpro_courses_module_settings to handle saving any custom fields you’ve added for a custom module.
apply_filters( 'pmpro_courses_structured_data_provider', $provider, $course );
Filters the provider organization in the Course structured data (JSON-LD) that the default module adds to single course pages, the course archive, and pages with the [pmpro_all_courses] shortcode or All Courses block. $provider is an array with @type (default Organization), name (default your site name), and sameAs (default your site URL). $course is the course WP_Post object.
apply_filters( 'pmpro_courses_structured_data_schema', $schema, $course );
Filters the full Course schema array for a course before it is output as JSON-LD. Use it to add properties such as image or offers, or to change the name and description. $course is the course WP_Post object.
Get Support From Our Team of Experts
Have a question about how to use this feature? Our Support Page outlines three ways to get support.
Our Max plans include hands-on help customizing your membership site and implementing new features. Upgrade to PMPro Max now »
Last updated on November 12, 2026