LifterLMS Filters

Filter Overview

# Back to top

If you’re not sure what a filter is and want to get started, take a look at the WordPress Codex reference on filters and the core function, add_filter().

Filters can be added to your theme’s or child theme’s functions.php file or to a site-specific plugin. We’ve created a very basic site specific for this purpose, you can get it for free here.

NOTE: This is a largely incomplete list of filters available with LifterLMS. We’re in the process of migrating our filter documentation from our old documentation hub.

If you’re a developer and you’re looking to filter something, you probably can. If it’s not listed here please check the codebase first and then submit a support ticket if you need help locating a filter.

lifterlms_checkout_buy_button_text

# Back to top

Customize the “Buy Now” text on the purchase button of the LifterLMS Checkout screen.

lifterlms_completed_transaction_message

# Back to top

Customize the success message displayed after a user successfully completes a LifterLMS purchase.

lifterlms_currencies

# Back to top

Add a custom currency to LifterLMS currencies list.

Ensure that your payment gateway(s) support the currency!

lifterlms_recurring_price_html

# Back to top

This filter allows you to modify the text of recurring payment pricing descriptions.

lifterlms_completed_transaction_redirect

# Back to top

Redirect students to a custom URL after a successful purchase.

lifterlms_get_single_price_html

# Back to top

This filter allows you to modify the text of single payment pricing descriptions.

llms_dashboard_recent_courses_count

# Back to top

Use this filter to customize the number of recent courses displayed on the main page of the LifterLMS Student Dashboard.

llms_dashboard_courses_per_page

# Back to top

Use this filter to customize the default number of courses displayed on each page when a student visits the “View All Courses” page on the student dashboard.

Added in version 3.5.4

lifterlms_sitewide_restriction_bypass_ids

# Back to top

Add additional pages to the list of pages shown to non-enrolled visitors when sitewide membership restrictions are in effect

llms_student_dashboard_default_tab

# Back to top

Customize the default tab displayed when student’s visit the LifterLMS Student Dashboard.

llms_get_student_dashboard_tabs

# Back to top

Use this filter to remove tabs from the LifterLMS Student Dashboard.

llms_gradebook_students_per_page

# Back to top

Customize the number of students displayed per page on the admin reporting table for “Students”.

Note that setting this number too high could result in PHP timeouts due to exhausted memory!

llms_gradebook_student-courses_per_page

# Back to top

Customize the number of courses per page on the admin reporting table for a student’s course list.

Note that setting this number too high could result in PHP timeouts due to exhausted memory!

llms_has_free_checkout

# Back to top

This filter allows you to disable quick enrollment and free checkout for free access plans. For more information see Checkout for Free Access Plans.

llms_membership_restricted_post_types

# Back to top

Use this filter to add or remove the ability for a post type to be restricted to a LifterLMS membership

llms_is_post_restricted_by_membership_skip_post_types

# Back to top

LifterLMS automatically skips membership restrictions checks on certain LifterLMS core post types which, by default, cannot be restricted to a membership.

You can use this filter to add or remove custom post types to or from this list.

To remove:

To add:

llms_show_preview_excerpt

# Back to top

Use this filter to hide the display of the Lesson short description on lesson preview tiles.

llms_student_dashboard_login_redirect

# Back to top

Use this filter to redirect users to a different place when they login using the Student Dashboard login form.

Admin Panel User Custom Fields

# Back to top

These filters allow you to add, display, save, and validate custom user meta fields as they are displayed and edited on the WordPress Admin Panel User Profile Screen.

These filters are located in “includes/admin/class.llms.admin.user.custom.fields.php”.

 

lifterlms_get_user_custom_fields #

Use this filter to add custom fields to the user’s profile on the WordPress admin panel

Added in LifterLMS 2.7.0, last updated LifterLMS 2.7.0

 

lifterlms_get_user_custom_field_value_{$field_id} #

Use this filter the customize the output of user field data when it is displayed on the admin panel.

Added in LifterLMS 2.7.0, last updated LifterLMS 2.7.0

 

lifterlms_validate_custom_user_field_{$field_id} #

Use this filter to validate custom user field data before it is saved to the database and output error messages specific to your custom field.

Added in LifterLMS 2.7.0, last updated LifterLMS 2.7.0

 

lifterlms_save_custom_user_field_{$field_id} #

Use this filter to filter the user submitted before it is stored in the database (after validation).

Added in LifterLMS 2.7.0, last updated LifterLMS 2.7.0

Become a Documentation Contributor

# Back to top

If you’re reading this you might be so passionate about LifterLMS that you want to help us document every single filter in the codebase (and more) please contact us and let us know

We’re looking for both programmers and non-programmers.

Last Updated on
Was this article helpful?