Skip Navigation

[Résolu] Query string on URL after CRED submit redirect

This support ticket is created Il y a 6 années et 8 mois. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 1 réponse, has 2 voix.

Last updated by Luo Yang Il y a 6 années et 8 mois.

Assisted by: Luo Yang.

Auteur
Publications
#554913

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

#554992

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.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.