gform_mollie_return_url

Description

gform_mollie_return_url filters Mollie’s result URL, which is the URL Mollie uses to redirect the customer to the merchant site.

Usage

add_filter( 'gform_mollie_return_url', 'your_function_name', 10, 3 );

Parameters

ParameterTypeDescription
$urlstringThe URL to be filtered.
$form_idintThe ID of the form being submitted.
$querystringThe query string portion of the URL.

Examples

Customize Mollie Return URL

add_filter( 'gform_mollie_return_url', 'customize_mollie_return_url', 10, 3 );
function customize_mollie_return_url( $url, $form_id, $query ) {
    if ( $form_id === 5 ) {
        $url = 'https://example.com/custom-thank-you';
    }
    return $url;
}

Placement

This code can be used in the functions.php file of the active theme, a custom functions plugin, a custom add-on, or with a code snippets plugin.

See also the PHP section in this article: Where Do I Put This Code?

Since

This filter was added in Mollie Add-On version 1.8.2.

Source Code

This filter is located in the class-gf-mollie.php file.