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
| Parameter | Type | Description |
|---|---|---|
| $url | string | The URL to be filtered. |
| $form_id | int | The ID of the form being submitted. |
| $query | string | The 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.