Forked from sc0ttkclark/my-pmpro-redirect-to-referring-page-after-checkout.md
Last active
December 12, 2024 07:03
-
-
Save ipokkel/32d6ba9425d4550a5861709498e00135 to your computer and use it in GitHub Desktop.
Redirect new members and existing members that changes their existing level back to the referring page after checkout.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Updated with https://gist.github.com/ipokkel/fdfeb10a8120777661fbef4e8ed80fa0 | |
* This gist is kept for archival purposes, use the updated one above please. | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.