groundhogg/confirmation_url

πŸ“… Published on

πŸ“ Last updated

Documentation

Β»

Filter Hooks

Β»

groundhogg/confirmation_url

Filters the email confirmation URL generated for a contact. Use this to redirect confirmations through a custom landing page.

apply_filters( 'groundhogg/confirmation_url', $url, $contact );

You will receive the generated URL string and the Contact object.

Example

add_filter( 'groundhogg/confirmation_url', 'my_extension_custom_confirm_url', 10, 2 );

/**
 * Add a redirect parameter to the confirmation URL.
 *
 * @param string               $url
 * @param \Groundhogg\Contact $contact
 *
 * @return string
 */
function my_extension_custom_confirm_url( $url, $contact ) {
    return add_query_arg( 'redirect_to', urlencode( home_url( '/welcome/' ) ), $url );
}

Was this helpful?

Let us know if this document answered your question. That’s the only way we can improve.