After successfully registered – Redirect to ” X ” page – MULTILINGUAL
-
Hello,
I have a issue, I want to have a code who works like this:
If user registered on English version – redirect to custom English registered successfully page
If user registered on French version – redirect to custom French registered successfully pageSo far I have made this below:
function bp_redirect($user)
$redirect_url = “”;if (defined(‘ICL_LANGUAGE_CODE’)) {
switch (ICL_LANGUAGE_CODE) {case ‘fr’:
$redirect_url = “https://mysite.com/fr/enregistrement-avec-succes/”;
break;default:
$redirect_url = ‘https://mysite.com/registration-successful/”‘;
break;}
bp_core_redirect($redirect_url);
}
return $redirect_url;
}
add_action(‘bp_core_signup_user’, ‘bp_redirect’, 100, 1);Unfortunately it is not working and I do not know what do do more to make it work.
Language plugin is WPML the language pages are http://www.mysite.com/fr , http://www.mysite.com/es etc,Please help me, I really need this script to be working.
Thank you so much
- You must be logged in to reply to this topic.