• Resolved aaatex

    (@aaatex)


    We are using the latest WP/WC and need to set a custom field in an order via the new
    (/wp-json/wc/v1/) API.

    The doc is very unclear on how to do this.

    We are using vb.net but any example or guidance would be helpful.

    Have tried this jsons
    {“order”: {“order_meta”: {“cfname”:”test”}}}
    and
    {“order_meta”: {“cfname”:”test”}}

    Is either correct?

    with URL
    https://shop.domain.com/wp-json/wc/v1/orders/3520?oauth_consumer_key…

    The response we are getting is 401 unauthorized that I can see. It is not clear where this authorization setting is. We can retrieve orders but not set the custom field.

    Can anyone help?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter aaatex

    (@aaatex)

    Anybody? Is it possible??

    Plugin Support Stuart Duff – a11n

    (@stuartduff)

    Automattic Happiness Engineer

    Hey,

    The WooCommerce API documentation can be found here below and it container all of the available parameters that can be using within the API.

    Looking at the Product Parameters I don’t see a way as yet to add custom meta fields.

    https://woocommerce.github.io/woocommerce-rest-api-docs/#product-properties

    Thread Starter aaatex

    (@aaatex)

    The doc is vague. I didn’t see it either.

    But I was asking to change the custom field not to add it.

    From other postings on the forum I received info on how to filter on the custom field which I did not see in the doc either.

    So I figured that I would ask.

    We need to be able to change the custom field.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to set a custom field in a WP Order using the new V1 API’ is closed to new replies.