I have this function to fetch all the custom values (the email) of an array of post IDs stored in the browser's cookies:
<?php if (wpfp_get_cookie()):
foreach (wpfp_get_cookie() as $post_id) {
$email = get_post_meta($post_id, 'email', true);
echo "".'$mail->AddAddress'."".'"('."$email".')"'."; ";
}
else:
endif;
?>
The function wpfp_get_cookie() is thus defined:
function wpfp_get_cookie() {
return $_COOKIE[WPFP_COOKIE_KEY];
}
Problem: $email is not being spit out. The meta values are not found. But the function works since when I echo any word or symbol it gets spit out as many times there are instances in the browser's cookies.
Can anyone help please?