Thanks, I was actually able to get the code in my OP to work by removing the nested array.
Strangely, it creates a meta_key and meta_value with the value of the first character sent. For example, if I send this:
$data = [
'meta_data' => [ '_custom_field' => '24.54' ]
];
It results in:
-----------------------------------------------------
| meta_id | post_id | meta_key | meta_value |
-----------------------------------------------------
| 123 | 234 | 2 | 2 |
-----------------------------------------------------
-
This reply was modified 8 years ago by
lawkwok.