For memberships, automatically pick up the redirect parameter and pass it on to the checkout page. This way students could be redirected to the course from where they started on a membership only access plan.
Add a checkbox to Membership only Access Plans to toggle such redirection.
Phase 2: Custom Redirection field
Simply add a field in the Access Plan (removed when WooCommerce is active) to set a redirect exactly the same as Sales Page with the default value as the same product. Without changing the core code, simply pass the redirection url in the redirect query parameter.
Note on Membership only Access Plans
For Membership only access plans, the setting on the course access plan will always override any setting on the Membership Access Plan itself. This can only be changed using custom code.
Implemented in two phases:
Phase 1:
redirect
query arg on Checkout URLAdd a filter to https://github.com/gocodebox/lifterlms/blob/cdbee2b4b3bfabf3339bd6870f3d3af8e9227da0/includes/abstracts/abstract.llms.payment.gateway.php#L153 to pick up the value of any
redirect
parameter, validate it and redirect to that after order completion.For memberships, automatically pick up the
redirect
parameter and pass it on to the checkout page. This way students could be redirected to the course from where they started on a membership only access plan.Add a checkbox to Membership only Access Plans to toggle such redirection.
Phase 2: Custom Redirection field
Simply add a field in the Access Plan (removed when WooCommerce is active) to set a redirect exactly the same as Sales Page with the default value as the same product. Without changing the core code, simply pass the redirection url in the
redirect
query parameter.