LifterLMS Filters

Filter Overview

# Top

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.

llms_allow_subscription_cancellation

# Top

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

lifterlms_autoadvance

# Top

Disable Auto-Advance to the next lesson when a lesson is completed.

lifterlms_checkout_buy_button_text

# Top

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

lifterlms_currencies

# Top

Add a custom currency to LifterLMS currencies list.

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

lifterlms_recurring_price_html

# Top

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

lifterlms_registration_redirect

# Top

Redirect new student registrations to a custom URL upon successful registartion.

lifterlms_get_single_price_html

# Top

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

llms_achievement_loop_columns

# Top

Modify the number of columns used when displaying achievements on the student dashboard and elsewhere.

llms_dashboard_courses_per_page

# 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

llms_email_css

# Top

Use this filter to customize the CSS added to LifterLMS-generated emails

llms_get_free_access_plan_pricing_text

# Top

Change the text displayed for free ($0.00) access plans.

llms_get_product_access_plan_limit

# Top

Change the maximum number of access plans which can be created for a single course / membership.

llms_notifications_settings

# Top

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

llms_order_automatic_retry_rules

# Top

llms_order_status_can_resubscribe_from

# Top

lifterlms_sitewide_restriction_bypass_ids

# 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

# Top

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

llms_get_student_dashboard_tabs

# Top

Use this filter to add, remove, or modify tabs on LifterLMS Student Dashboard.

This example removes tabs:

This example adds tabs:

 

llms_gradebook_students_per_page

# 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

# 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

# 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_lesson_complete_redirect

# Top

Use this filter to redirect a student to a custom url upon marking a lesson complete.

llms_is_post_restricted_by_membership_skip_post_types

# 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

# Top

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

Admin Panel User Custom Fields

# 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

Last Updated on
Was this article helpful?