In this code:
if ($gender == 'his_Male') {
$wpgender="Male";
} elseif ($gender="her_Female") {
$wpgender="Female";
} else {
$wpgender="Other";
}
You’re not comparing $gender
to 'her_Female'
, you’re setting it to 'her_Female'
:
} elseif ($gender="her_Female") {
You should be using ==
or ===
(preferably ===
, the difference is documented here).
Your second question is really a chrome-php issue, and not really on topic here. However, I would wager issue is likely that the xprofile_updated_profile
hook is not run at a time that could log anything to the console while you were looking at it. You would be better off logging any debug information you need to a file. error_log()
is the most straightforward method, but there are libraries out there that could also help.