-
-
Save ipokkel/32d6ba9425d4550a5861709498e00135 to your computer and use it in GitHub Desktop.
<?php | |
/** | |
* Updated with https://gist.github.com/ipokkel/fdfeb10a8120777661fbef4e8ed80fa0 | |
* This gist is kept for archival purposes, use the updated one above please. | |
*/ |
@GiannisRallis This is experimental code that is intended to redirect users back to the last page/post they visited before checking out for membership and is not designed to redirect users to a custom URL per level after checkout.
You should be able to achieve the latter by hooking into the pmpro_confirmation_url
filter. Here is a gist that you or your developer may use as an example to tweak to suit your site-specific requirements - https://gist.github.com/ipokkel/c9fb4f9bece3814ffa5120c23a61b811
I hope this helps get you started. :)
Thank you This works for posts but not for custom post types. I am using WP Job Manager and the listings redirect to a subscription page when visited by a non-member. How can I modify these codes to append the referrer to the job listings so that after checkout the user is redirected back to the previous page? Thank you for your help.
Your code is not work on my website :(