1 comment

  1. To update post meta that are an array: you have to fetch the original values, change the value you need and update it again. For example

    $list_of_values = get_post_meta($post_id, '_list_values', true);
    if(!empty($list_of_values)) {
        $list_of_values["some_prop"] = "new value";
    }
    update_post_meta($post_id, '_list_values', $list_of_values);
    

Comments are closed.