Can you help with my custom function? Trying to do a redirect, but having a prob
-
I paid someone to create create the a function using the available lifter functions. What I needed was if a user tries to access a lesson they are not enrolled in, to redirect them. The function was working great, but under further inspection, I have found one problem.
The function is also doing this redirect when simply trying to view a course page.
Here is the function
add_filter( ‘lifterlms_membership_restricted_message’, function( $msg ) {
header (“location:/my-courses/”);
}, 10, 1 );add_filter( ‘lifterlms_lesson_enrollment_restricted_message’, function( $msg ) {
header (“location:/my-courses/”);
}, 10, 1 );I guess because the course is part of a membership, the membership restriction is kicking in even through they should still be able to view the course info.
I need this to work this way for a new template I am releasing for free for everyone. You can see kinda what I am doing here: https://www.wpcrafter.com/create-online-course-membership-website/
- The topic ‘Can you help with my custom function? Trying to do a redirect, but having a prob’ is closed to new replies.