Hi Agenciahouse,
Yes, you can add some variables to the redirect URL using the provided yikes-mailchimp-redirect-url
filter.
The following snippet should work for appending additional variables onto the URL.
Feel free to alter the snippet as needed:
function yikes_mailchimp_append_query_args_redirect_url( $url, $form_id, $page_data ) {
$url = add_query_arg( array(
'variable1' => 'true',
// 'variable2' => 'false',
), $url );
return esc_url( $url );
}
add_filter( 'yikes-mailchimp-redirect-url', 'append_query_args_redirect_url', 10, 3 );
You’ll want to add that code snippet to the bottom of your active themes functions.php file. Once added, all of your forms will append the variables onto the URL after a successful form submission.
Please note, at the moment non-ajax redirects seem to be having an issue. I am currently working on a patch that will get things working again. When that patch is out, the snippet above will work on Non-AJAX forms as well.
Thanks,
Evan