This recipe allows you to send the member to a unique confirmation page after completing checkout. You can set a confirmation page for each membership level you offer. This is an alternative method to using the membership required shortcode or block on the confirmation page to show unique content.
Note that each unique page can still use the standard membership confirmation page shortcode or block to display standard information (level name, account, and invoice information). This simply allows you to add more customized information before or after the standard shortcode output based on level.

The Code Recipe
/** * Redirect Members to a Unique Confirmation Page Based on Membership Level * * title: Redirect Members to a Unique Confirmation Page Based on Membership Level * layout: snippet * collection: checkout * category: confirmation * * 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 ( '1' === $pmpro_level->id ) { $rurl = 'http://example.com/page_1'; } elseif ( '2' === $pmpro_level->id ) { $rurl = 'http://example.com/page_2'; } elseif ( '3' === $pmpro_level->id ) { $rurl = 'http://example.com/page_3'; } return $rurl; } add_filter( 'pmpro_confirmation_url', 'my_pmpro_confirmation_url', 10, 3 );
Adding the Recipe to Your Website
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.
Update lines 18 through 24 for your site’s level ID and confirmation URL relationships.