Based on this:
Array (
[0] => Array (
[wpd_function_rating] => 33
[wpd_feature_rating] => 12
[wpd_support_rating] => 66
)
)
I can spot at least one problem. You have a nested array but are only looping over the top level. Here:
foreach ( $ls_up_votes as $key => $value )
{
if ( $key == $currentusr )
{
unset( $ls_up_votes[$key] );
}
}
Try var_dump($key,$value)
inside that foreach
.
I think that your solution is going to be to pass the third parameter to get_post_meta
so that it returns “single” and not an array. It is a bit weird but works somewhat counter-intuitively with serialized arrays like I think you have.
$ls_up_votes = get_post_meta($postid, 'wpd_rating');