Jetpack

Jetpack Subscriptions

Last updated 3 months ago

PHP
/**
 * Redirect all successful subscription submissions to a 'thank-you' page.
 */
function hlabs_custom_sub_redirect_page( $result ) {
    if ( 'success' === $result ) {
        $thanks_page = 'thank-you';
        wp_safe_redirect( $thanks_page );
        exit;
    }
}
add_action( 'jetpack_subscriptions_form_submission', 'hlabs_custom_sub_redirect_page' );

Tags: #Jetpack

All code snippets are licensed GPLv2 or later unless otherwise stated.