Hi,
I'm tryng to remove query string on URL after redirect upond CRED submission.
I've correctly set redirect using cred_success_redirect hook but I still got ?cred_referrer_form_id=93 this string appended to my URL.
I'm sure that in the past redirection on hook didn't carry any query string. And I was pleased by this behaviour.
I see there is also another hook "cred_form_action_uri_querystring_array"
I've attempted to remove cred_referrer_form_id from querystring_array but I still get that string appended onto URL
Would you please help?
Thanks
Carlo
Dear Carlo,
This is expected result, the filter hook "cred_success_redirect " is triggered before CRED add URL parameter "cred_referrer_form_id", so filter hook "cred_success_redirect " can not remove URL parameter "cred_referrer_form_id", see the source coded of CRED plugin, file \cred-frontend-editor\application\models\form\post.php, line 124~131:
if ( 'form' != $credaction && 'message' != $credaction ) {
$url = apply_filters( 'cred_success_redirect_form_' . $form_slug, $url, $post_id, $thisform );
$url = apply_filters( 'cred_success_redirect_' . $form_id, $url, $post_id, $thisform );
$url = apply_filters( 'cred_success_redirect', $url, $post_id, $thisform );
}
if ( false !== $url ) {
$url = add_query_arg( 'cred_referrer_form_id', $form_id, $url );
So there isn't such a feature to remove the URL parameter "cred_referrer_form_id", if you agree, we can take it as a feature request.