Support » Plugin: WooCommerce » WC REST API v2 – appending a product category

  • Resolved vaniivan



    I have a list of post_ids, and I’d like to batch update these products, to add/append a category to each of them.
    I’d like to append the category, not overwrite the categories field, so I tried PUT as well as POST method of updating the product, but in all cases the supplied category_id overwrote existing terms associated with that product.
    Is there a way of appending the term using api, or should I go the plain ol’ PHP route?

Viewing 1 replies (of 1 total)
  • Plugin Support Con Schneider


    Automattic Happiness Engineer

    Hi there,

    Good ole’ plain PHP it is.
    You will need to create a custom function that appends the category and register an endpoint that uses this as callback for it.

Viewing 1 replies (of 1 total)
  • The topic ‘WC REST API v2 – appending a product category’ is closed to new replies.