Update product meta via API

#77365
  • Resolved Miroslav Nekoranec
    Rank Math pro

    Hi there,

    first, RankMath is the best plugin for seo 😉 good work guys…

    my problem:
    I have my own c# app, by witch I create new products and update existing products.
    I use this nuget: https://github.com/XiaoFaye/WooCommerce.NET

    I know that you can not support by this plugin, but my problem is…

    I’ve get product from my page and he has meta_data, where is stored info about (meta_values from wp_postmeta). Example:
    – rank_math_title – “product name”
    – rank_math_description – “product description”
    – rank_math_focus_keyword – “product”
    – rank_math_robots – “{[ “index”]}”

    When I download product and make no change and make an api call to edit product, I get response:
    {“code”:”rest_invalid_param”,”message”:”Neplatn\u00fd parameter: meta_data”,”data”:{“status”:400,”params”:{“meta_data”:”meta_data[5][value] nie je typ string,null.”}}}

    MetaData deserialized:
    “meta_data”:[
    {“id”:8382651,”key”:”manufacturer”,”value”:”SENSILLO”},{“id”:8382652,”key”:”_ean”,”value”:”5902021524495″},{“id”:9847094,”key”:”rank_math_title”,”value”:”Prebaľovacia podložka Sensillo zelená za 11,75EUR”},{“id”:9847095,”key”:”rank_math_description”,”value”:”Prebaľovacia podložka Sensillo zelená”},{“id”:9847096,”key”:”rank_math_focus_keyword”,”value”:”prebaľovacia podložka sensillo zelená”},
    {“id”:9847097,”key”:”rank_math_robots”,”value”:[“index”]}
    ]

    Do you have any idea ? Or it is some of default value for “rank_math_robots” ?

    thank you

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello,

    Thank you for contacting Rank Math today.

    Could you try using index as a string, {"id":9847097,"key":"rank_math_robots","value":"index"} instead of {"i"”:9847097,"key":"rank_math_robots","value":["index"]}

    Looking forward to helping you. Thank you.

    ​​​​​​

    thank you for your answer, it was problem with woocommerce plugin 😉

    woocommerce made new version of his plugin.

    4.3.3 – 2020-08-14
    WooCommerce REST API 1.0.10-pl-2
    * Fix – Fix regression and restore backward compatibility for date-time and mixed datatypes. #239

    After update this plugin started works product update by API

    Hello,

    We are glad we could assist you.

    Do you wish to close this ticket?

    If you have any further question(s), please let us know. Thank you.

    yes please – thank you

    Alberto
    Rank Math business

    Hello Miroslav,

    We are super happy that this resolved your issue. If you have any other questions in the future, know that we are here to help you.

    If you don’t mind me asking, could you please leave us a review (if you haven’t already) on https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post about your overall experience with Rank Math? We appreciate your time and patience.

    If you do have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.

    Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)

You must be logged in to reply to this ticket.