Skip Navigation

[Resolved] I have a similar question for New Customer Redirect code

This support ticket is created 3 years, 11 months ago. 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.

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 reply, has 2 voices.

Last updated by Luo Yang 3 years, 11 months ago.

Assisted by: Luo Yang.

Author
Posts
#1867307

Thank you, looks like it worked.

Lastly, I have a similar question for New Customer Redirect code. How could I make this code work for form ID: 991 and also ID: 992 & 993 & ... etc? Thank you

<?php
/**
* New custom code snippet (replace this with snippet description).
*/

toolset_snippet_security_check() or die( 'Direct access is not allowed' );

// Put the code of your snippet below this comment.

add_filter('cred_success_redirect', 'custom_redirect',10,3);
function custom_redirect($url, $post_id, $form_data)
{
if ($form_data['id']==991)
return 'hidden link';

return $url;
}

#1867323

Hello,

Same as your previous thread, you can try these:

Replace this line from:
if ($form_data['id']==991)

To:

$arr = array(991, 992, 993); // add more form IDs here
if ( in_array($form_data['id'], $arr) ) 

More help:
hidden link