• For those of you who are puzzled over the logging in issue Learnpress presents when a user logs in and enrolls, or when a user purchases a product, there is no need to abandon the plugin entirely! This may be a quick fix but it all lies within this little snippet of code in the form-register.php and form-login.php located within the wp-content/plugins/learnpress/templates/global folder and the wp-content/plugins/learnpress/templates/checkout folder in Learnpress:

    <form name=”learn-press-register” method=”post” action=””>

    Here are the steps to take

    STEP 1:

    in your /global folder

    open: form-register.php

    change <form name=”learn-press-login” method=”post” action=””>
    to: <form name=”learn-press-register” method=”post” action=”/profile”>

    (this will create a redirect back to the users PROFILE page after they complete Learnpress registration. They will be logged in and registered as a student and immediately able to access the dashboard.)

    Make a duplicate copy of form-register.php and name it checkout-form-register.php

    Keep this: <form name=”learn-press-register” method=”post” action=””>

    (when action=”” is left blank, the user is directed back to the previous page they were on after making a purchase.)

    STEP 2

    open form-login.php
    change <form name=”learn-press-login” method=”post” action=””>
    to: <form name=”learn-press-login” method=”post” action=””>

    Make a duplicate copy of form-login.php and name it checkout-form_login.php

    Keep this: <form name=”learn-press-login” method=”post” action=””>

    STEP 3

    Upload the four PHP files back to your GLOBAL folder:

    form-login.php
    checkout-form-login.php
    form-register.php
    checkout-form-register.php

    STEP 4

    in your /checkout folder:

    open: form-register.php

    change: <?php learn_press_get_template( ‘global/form-register.php’ ); ?>
    to: <?php learn_press_get_template( ‘global/checkout-form-register.php’ ); ?>

    STEP 5

    open form-login.php

    change <?php learn_press_get_template(‘global/form-login.php’);?>
    to: <?php learn_press_get_template(‘global/checkout-form-login.php’);?>

    STEP 6

    Upload the two PHP files you just edited back to your CHECKOUT folder:

    form-login.php
    form-register.php

Viewing 4 replies - 16 through 19 (of 19 total)
  • Thread Starter thedvshow

    (@thedvshow)

    ?? IMPORTANT ??

    I am no longer using Learnpress

    1. As of this post it was extremely buggy and took up too much of my time trying to develop workarounds and customizations the developer should be taking care of. It was one thing after another – then with the constant upgrades I finally threw in the towel.

    2. Learnpress will slow your WP website down. I was getting a 6.0 sec load time when installed. After deleting the plugin I now have 1.5 load time on entire site.

    Learnpress (as of this post) needs lots of attention on the back end. Great concept but it needs more work in development. My guess is someone bought old plugin code and is just constantly working on the numerous bugs that occur while all who download are just testers.

    ?? NOT SOLID CODE…not a plugin ready for primetime!!!

    Hey, Don’t lose hope.
    I solved it using Peter’s loggin redirects. Its a plugin that forces redirection to any page by user or by role

    Just install it… goto to setting ….login/logout redirects…. select user/role set the url ….. click add rule… and voila!!!!

    isline

    (@isline)

    @mannylaphixer I have a big problem! I’m using hestia theme and learnpress plugin and i created just 1 free course. User must only register to view all lesson but…
    When the user is logged in, he is redirect to the course.
    When a new user registers his new account, he is redirected only on dashboard.
    I tried to use Peter’s login redirect only for users registrating their account…but it doesn’t work at all!
    According to you, Where is the problem ?

    Alternatively do you know if Is there a chance to redirect user (just registered) after user being logged in to the landing page of there course customer came from?

    https://www.omeostasi.org
    Thank you very much, Lina

    • This reply was modified 4 years ago by isline.

    Hi, I’m having trouble getting to the learnpress global folder. Can you tell me how to do access this?

Viewing 4 replies - 16 through 19 (of 19 total)
  • The topic ‘Redirect after Log in’ is closed to new replies.