Redirect Upon Registration...
Posted: October 26th, 2011, 10:02 am
Hi guys,
I'm using the the pro form to bring new members in at level 1 on a 14 day free trial. This all works fine. However, after they have filled out the registration form, a hidden div appears saying
What I want to happen instead, is for new members to automatically be redirected to a new page, immediately after registration, rather than the hidden
I thought I could do this simply by adding a redirect in s2member-pro "paypal-responses.inc.php", but in doing so, I think it no longer registers new users properly, as the first and last names are no longer populated in the Dashboard, and also the "Display name publicly as" doesn't update any more...
Here's the section of code with the bad redirect:
Can somebody please tell me the right way of doing this please?
All I want to do is automatically send them to a page, after registration, telling them to check their email to activate their account. Which is basically just an aweber confirmation email.
Thanks
Rob.
I'm using the the pro form to bring new members in at level 1 on a 14 day free trial. This all works fine. However, after they have filled out the registration form, a hidden div appears saying
Thank you. Please login.
What I want to happen instead, is for new members to automatically be redirected to a new page, immediately after registration, rather than the hidden
. div appear on the registration form.Thank you. Please login
I thought I could do this simply by adding a redirect in s2member-pro "paypal-responses.inc.php", but in doing so, I think it no longer registers new users properly, as the first and last names are no longer populated in the Dashboard, and also the "Display name publicly as" doesn't update any more...
Here's the section of code with the bad redirect:
- Code: Select all
/**
* Creates response divs after Registration processing.
*
* @package s2Member\PayPal
* @since 1.5
*
* @param array $attr An array of Pro Form Attributes.
* @return array An array of response details.
*/
public static function paypal_registration_response ($attr = FALSE)
{
$_response = $GLOBALS["ws_plugin__s2member_pro_paypal_registration_response"];
/**/
$_response = (!$_response) ? c_ws_plugin__s2member_pro_paypal_responses::paypal_form_attr_validation_errors ($attr) : $_response;
/**/
if ($_response && ($error = $_response["error"])) /* Error reporting. */
{
$response = '<div id="s2member-pro-paypal-form-response" class="s2member-pro-paypal-form-response-error s2member-pro-paypal-registration-form-response-error">';
$response .= $_response["response"];
$response .= '</div>';
}
else if ($_response) /* Otherwise, we treat this as an informational response. */
{
$response = '<div id="s2member-pro-paypal-form-response" class="s2member-pro-paypal-form-response-info s2member-pro-paypal-registration-form-response-info">';
$response .= $_response["response"];
$response .= '</div>';
wp_redirect( '/activate-your-account/' );
}
/**/
Can somebody please tell me the right way of doing this please?
All I want to do is automatically send them to a page, after registration, telling them to check their email to activate their account. Which is basically just an aweber confirmation email.
Thanks
Rob.