Change the confirmation link text

📅 Published on

📝 Last updated

Documentation

»

Code Samples

»

Change the confirmation link text

Changes the text of the confirmation link when using the {confirmation_link} replacement code.

<?php

/**
 * Customize the confirmation text displayed after form submission.
 *
 * This function replaces the default confirmation text with a custom message.
 *
 * @param string $confirmation_text The default confirmation message.
 * @return string The customized confirmation message.
 */
function custom_confirmation_text( $confirmation_text ) {
    // Define the custom confirmation message
    $custom_text = __( 'Your custom confirmation text goes here.', 'groundhogg' );

    return $custom_text;
}

// Hook into the Groundhogg filter to modify the confirmation text.
add_filter( 'groundhogg/replacements/confirmation_text', 'custom_confirmation_text', 10 );

Was this helpful?

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