- Introduction
- Branches
- Commits
- Messages
- Pull Requests
- References
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "llms/dummy-recipe", | |
"description": "This Recipe creates enrolls & redirects newly registered members to a welcome course.", | |
"author": "saurabhshukla", | |
"tags": [ "onboarding", "membership", "course" ], | |
"micros": [ "llms/welcome-course-membership", "llms/dummy-micro" ] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // Do not copy this line | |
// Copy from under this line and paste into your child theme's functions.php | |
add_action( 'init', 'llms_mc_remove_consent' ); | |
function llms_mc_remove_consent(){ | |
// remove the following line if you want to keep the consent form on checkout | |
remove_action( 'llms_registration_privacy', 'llms_mc_consent_form_field' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // don't copy this line to your functions.php file | |
/** | |
* | |
* Create Company Industry as a custom field upon registration or checkout | |
* | |
* @param $fields - fields already being registered | |
* @param $screen - either checkout or registration screen | |
* @return $fields - array with added field | |
*/ | |
function add_company_industry_lifterlms ( $fields , $screen ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // Do not copy this line | |
// Copy from under this line and paste into your child theme's functions.php | |
add_action( 'llms_user_enrolled_in_course', 'llms_enroll_in_addon_course', 10, 2 ); | |
function llms_enroll_in_addon_course( $student_id, $course_id ){ | |
/* | |
* the main course's id. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Call like | |
* Session->start( $unique ); | |
*/ | |
class Session{ | |
// hook into WordPress to start sessions. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // Do not copy this line | |
// Copy from under this line and paste into your child theme's functions.php | |
add_filter( 'llms_get_product_schedule_details', 'llms_one_time_payment_trial', 10, 2 ); | |
function llms_one_time_payment_trial( $schedule_message, $access_plan ) { | |
/* get access plan id from next to the Access Plan's Title, for eg: | |
* "Test Access (ID# 1322)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // Do not copy this line | |
// Copy from under this line and paste into your child theme's functions.php | |
add_filter( 'llms_get_student_dashboard_tabs' , 'llms_remove_dashboard_index' ); | |
function llms_remove_dashboard_index( $endpoints ){ | |
$endpoints['dashboard']['content'] = $endpoints['view-courses']['content']; | |
$endpoints['dashboard']['title'] = $endpoints['view-courses']['title']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // Do not copy this line | |
// Copy from under this line and paste into your child theme's functions.php | |
add_action( 'template_redirect', 'lifterlms_course_continue_redirect' ); | |
if ( ! function_exists( 'lifterlms_course_continue_redirect' ) ) { | |
function lifterlms_course_continue_redirect( $post_id = null, $student = null, $progress = null ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php// Do not copy this line | |
// Copy from under this line and paste into your child theme's functions.php | |
add_filter( 'lifterlms_pre_checkout_error', 'llms_custom_empty_cart_message' ); | |
function llms_custom_empty_cart_message(){ | |
if ( isset( $_GET['plan'] ) && is_numeric( $_GET['plan'] ) ) { | |
return false; |