Created
January 12, 2026 11:58
-
-
Save JarrydLong/a80fb58be9509d7bcf2c5c6b7a621be9 to your computer and use it in GitHub Desktop.
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 //do not copy | |
| /* This recipe will redirect a member after checkout to their invoice | |
| * | |
| * You can add this recipe to your site by creating a custom plugin | |
| * or using the Code Snippets plugin available for free in the WordPress repository. | |
| * Read this companion article for step-by-step directions on either method. | |
| * https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
| */ | |
| function my_pmpro_confirmation_url($url, $user_id, $level){ | |
| //Get the order | |
| $order = new MemberOrder(); | |
| $order->getLastMemberOrder( $user_id ); | |
| //Order number | |
| $member_order = $order->code; | |
| //Build URL | |
| $url = home_url("/membership-account/membership-invoice/?invoice=".$member_order ); | |
| return $url; | |
| } | |
| add_filter( 'pmpro_confirmation_url', 'my_pmpro_confirmation_url', 10, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment