A couple of weeks ago I came up with the idea of designing a way to Bypass Drip Content in LearnDash in an simple way on a user per user basis and that also allows the user to mark the bypassed drip content as complete.
The Problem
Drip Content in LearnDash allows you to stop users from accessing a lesson immediately after they enroll in a course and sets them to wait for a certain period of time you configure in the lesson’s settings.
But there might be a case where you want to exclude some users from the drip content rule and grant them immediate access. Let’s you have a course that sells for $97 and every lesson is available every 7 days from one another.
Then say you want to offer a premium version of it at $297 and between the premium benefits give the users full access to all lessons at once.
To bypass drip content for LearnDash right now you’d need to either do a complex setup with a CRM and an automation tool like Zapier, Pabbly, WP Fusion, or change the user’s enrollment date manually for each user.
The Solution
The plugin I came up with Bypass Drip Content for LearnDash helps you bypass drip content on a lesson by lesson basis, picking users one by one or including users from a group at once (supports multiple groups).
You can download it for free from the repository in my GitHub account: https://github.com/j2machado/bypass-drip-content-for-learndash.
But what is drip content in LearnDash anyway?
Essentially, LearnDash LMS allows you to drip content by setting a release time in the Lesson Release Schedule option. You can access this option in the Lesson Settings. There are two ways to reach the Lesson Settings:
No matter what process you choose, after selecting the Lesson, go to the Settings tab like so:
The Lesson Release Schedule option is the third option inside Lesson Access Settings:
You have three modes:
After setting the Lesson Release Schedule for your lessons, the course content is now on a drip row.
To bypass drip content, LearnDash has a filter ld_lesson_access_from__visible_after.
This filter accepts three arguments, $lesson_access_from, $lesson_id, $user_id.
You can set the filter to return 0 or the output of the PHP time() function and that will suffice to bypass the drip content like so:
add_filter( 'ld_lesson_access_from__visible_after' , 'bypass_drip_content_for_learndash');
function bypass_drip_content_for_learndash($lesson_access_from, $lesson_id, $user_id){
return time(); //Can return 0 too.
}
But what about bypassing drip content for specific users, and ignore the remaining users?
That’s where Bypass Drip Content for LearnDash comes in handy.
Sure you can do your own logic making an array of user IDs then mapping that array with the current logged in user, etc. That’s basically what the Bypass Drip Content for LearnDash does already for you.
After installing and activating the plugin on your LearnDash website, go to the Settings tab in the lesson you want to enable bypass drip content and you’ll see the following at the very bottom of the Lesson Settings screen:
Click the radio switch to Enable Bypass Drip Content.
Then you’ll see two options get expanded:
You can download the plugin completely for free from my GitHub account: https://github.com/j2machado/bypass-drip-content-for-learndash.