• Resolved tanuki1986

    (@tanuki1986)


    Since I was having the problem mentioned here I ended up creating my website at lavoixducorps.eu and install another wordpress instance in a subdirectory https://lavoixducorps.eu/academy/ running with another theme (Divi) working with lifterLMS without conflict. In admin-dashboard>course>access plan> I have set checkout redirect to dashboard.
    I have installed lifterlms-customizations.zip and edited with
    /**
    * Redirect to a custom page on your site during LifterLMS Registrations
    * @param string $url default URL
    * @return string
    */
    function my_lifterlms_reg_redirect( $url ) {
    return untrailingslashit( get_site_url() ) . ‘/academy’;
    }
    add_filter( ‘lifterlms_registration_redirect’, ‘my_lifterlms_reg_redirect’ );

    /**
    * Redirect a user after sucessfully purchasing a course or membership
    * @param string $url default redirect URL
    * @param obj $order Instance of the LLMS_Order for the completed transaction
    * @return string
    */
    function my_lifterlms_completed_transaction_redirect( $url, $order ) {
    return ‘https://lavoixducorps.eu/academy’;
    }
    add_filter( ‘lifterlms_completed_transaction_redirect’, ‘my_lifterlms_completed_transaction_redirect’, 10, 2 );

    However when I test enrolment, I got redirected to https://lavoixducorps.eu/academy/?orders=orderNumber which display:
    No Results Found
    The page you requested could not be found. Try refining your search, or use the navigation above to locate the post.

    The student is enrolled
    The email for payment is sent to student.
    The payement method is set to offline payement.
    In admin-dashboard> reading> home page display is set to a static page> dashboard

    How can I get the students to get redirect to the dachboard page after enrolment?

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter tanuki1986

    (@tanuki1986)

    @thomasplevy anything on this, please ?

    Thread Starter tanuki1986

    (@tanuki1986)

    @thomasplevy don’t know if the problem is related but when clicking on lost password, I’m getting a page not found as well. https://lavoixducorps.eu/academy/

    I did navigate to LifterLMS -> Settings -> Accounts
    lost password is set to lost-password.

    I did this as well https://lifterlms.com/docs/how-to-flush-wordpress-rewrite-rules-or-permalinks/

    Still the same problems.

    After enrollment to a course, I get redirected to a page not found and when clicking on lost password link as well.

    @tanuki1986

    It’s hard to say exactly what’s happening here. The ?orders=orderNumber is not a query string variable appended by any piece of the LifterLMS core.

    Do you have any other custom code that could be causing this redirect issue?

    It’s hard to help with custom code without having a full glimpse into all the custom code running on your site. Most of the time when users have issues with custom code it’s a result of their code being written wrong. The snippets you’re sharing seem like they’re correct but it could be something else causing the issue.

    If you could post your system report as well as any other custom code you might have running on your site I can have a look and see what may be causing this.

    In general I’m always here to help but when you start writing a lot of custom code you’re ultimately responsible for supporting that custom code.

    If you want to workshop custom code at length you could stop by my office hours in Slack. Check the calendar at https://make.lifterlms.com/ and stop by for some real-time development conversation. I hope you can understand that I can’t be on call to help with custom code 24 hours a day and the office hours give you the opportunity to interact with me in real time!

    Check out lifterlms.com/slack to join the slack channel.

    Otherwise post everything here and I’ll get back to you.

    Best,

    Thread Starter tanuki1986

    (@tanuki1986)

    Thank you for your reply @thomasplevy, I ended up reinstalling everything from scratch. The problem seem to be the permalink structure. It is now set to “Plain” and all the redirection is working just fine. However, when I switch to “post name” the redirection for “lost password” and after enrollment stop working.
    I think I will just leave it on “plain” as it’s working and that install of WordPress is in a subdirectory and just being used for lifterlms allowing me to use the theme understrap that was conflicting with lifterlms for the main site and using divi with lifterlms for the academy site in the subdirectory. I would have preferred to get lifterlms to work with understrap but couldn’t find how to solve the conflict. Thank you for the link I’ll check what’s on there. Take care.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Redirection after enrolment not working’ is closed to new replies.