Skip Navigation

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

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.

Our next available supporter will start replying to tickets in about 6.40 hours from now. Thank you for your understanding.

This topic contains 1 reply, has 2 voices.

Last updated by Luo Yang 12 months ago.

Assigned support staff: 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

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

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