thanks!
just tried it and I had to replace with this
$langs = array(‘en’,’fr’);
if ( in_array( $data, $langs ) ) {
return true;
} else {
return false;
}
}
and also this line
alo_em_update_subscriber_by_email ( $subscriber->email, [], $subscriber->active, $subscriber->cf_lang, false );
to
$dummy = array();
alo_em_update_subscriber_by_email ( $subscriber->email, $dummy, $subscriber->active, $subscriber->cf_lang, false );
}
and that works
probably my version of php!
Hello, unfortunately the subscriber language that is returned is 50% wrong.
So I would prefer that the subscriber chooses himself the correct language, also specially because the only two choices are FR and EN (and not german, japanese, etc)