Created
June 15, 2022 06:47
-
-
Save JarrydLong/330325d6dbf92233678ae6030834c2cd to your computer and use it in GitHub Desktop.
This file contains 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 | |
/** | |
* Redirect to your chosen page after checking out when a member purchases a specific level. | |
* | |
* 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( $rurl, $user_id, $pmpro_level ) { | |
if( pmpro_hasMembershipLevel( 2 ) ){ //Change the level ID | |
$rurl = "INSERT_FULL_URL"; | |
} | |
return $rurl; | |
} | |
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