LifterLMS Filters
Filters are one of two kinds of hooks made available in WordPress.
Before getting started with LifterLMS filters, you may want to familiarize yourself with how to utilize filters in WordPress and the WordPress 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.
There are hundreds of filters available in LifterLMS. Head over to the LifterLMS Code Reference to find a full list of all the filters in LifterLMS.
Use this snippet to prevent students from being able to self-cancel their recurring subscriptions on the student dashboard.
Added in LifterLMS 3.10.1
Disable Auto-Advance to the next lesson when a lesson is completed.
Customize the “Buy Now” text on the purchase button of the LifterLMS Checkout screen.
Add a custom currency to LifterLMS currencies list.
Ensure that your payment gateway(s) support the currency!
This filter allows you to modify the text of recurring payment pricing descriptions.
Redirect new student registrations to a custom URL upon successful registartion.
This filter allows you to modify the text of single payment pricing descriptions.
Modify the number of columns used when displaying achievements on the student dashboard and elsewhere.
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
Use this filter to customize the CSS added to LifterLMS-generated emails
Change the text displayed for free ($0.00) access plans.
Change the maximum number of access plans which can be created for a single course / membership.
Use this filter to customize settings associated with LifterLMS Basic Notifications.
Currently the only settings is the heartbeat interval which is used to customize how frequently AJAX calls are made to check for new notifications.
Added in LifterLMS 3.9.5
Add or modify recurring order failed payment retry rules.
Add additional pages to the list of pages shown to non-enrolled visitors when sitewide membership restrictions are in effect
Customize the default tab displayed when student’s visit the LifterLMS Student Dashboard.
Use this filter to add, remove, or modify tabs on LifterLMS Student Dashboard.
This example removes tabs:
This example adds tabs:
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!
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!
This filter allows you to disable quick enrollment and free checkout for free access plans. For more information see Checkout for Free Access Plans.
Use this filter to redirect a student to a custom url upon marking a lesson complete.
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:
Use this filter to hide the display of the Lesson short description on lesson preview tiles.
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