Viewing 2 replies - 1 through 2 (of 2 total)
  • Luke Cavanagh

    (@lukecavanagh)

    Thread Starter lawkwok

    (@lawkwok)

    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.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Updating product metadata using REST API’ is closed to new replies.