# Paid Memberships Pro: Custom Thank-You Page per Level

> Sends new members to a different confirmation page for each level after checkout, for example an onboarding page for your premium tier.

- Type: PHP
- Runs: Run everywhere
- Category: [Memberships](https://wpide.com/library/category/memberships/)
- Tags: pmpro, checkout, redirect
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/pmpro-confirmation-redirect-per-level/

## Code

```php
if ( ! function_exists( 'pmpro_url' ) ) {
    return;
}

// Level ID => thank-you URL.
$wpide_pmpro_thanks = array(
    2 => home_url( '/welcome-premium/' ),
);

add_filter( 'pmpro_confirmation_url', function ( $url, $user_id, $level ) use ( $wpide_pmpro_thanks ) {
    $level_id = is_object( $level ) ? (int) $level->id : (int) $level;

    return $wpide_pmpro_thanks[ $level_id ] ?? $url;
}, 10, 3 );
```

## Notes

Levels not listed keep PMPro's normal confirmation page.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Paid Memberships Pro: Custom Thank-You Page per Level" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
