Leave a Reply

1 comment

  1. replace:

    add_post_meta($pid, $k, serialize($v2));
    

    with:

    add_post_meta($pid, $k, $v2);
    

    i found out that add_post_meta function already serializes the data, therefore i didn’t need to use serialize() which was serializing the data again.