REST API – assign new tags
-
Hi,
Is there a way to use the REST API in a way that I could assign new tags to a product without needing to first collect all existing tags into an array?
Im asking because i tried to do the code bellow and all existing product tags have been removed and the product was left only with the one that I added with the code:
$tags[] = array(‘id’ => 13);
$data = [
‘tags’ => $tags,
];$woocommerce->put(‘products/’ . $productId, $data);
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘REST API – assign new tags’ is closed to new replies.