Assign more than 1 category to woocommerce product ("update product" module)

my main goal is to only ADD one category (Category id: 207) to the product, without changing it current categories.

im trying to assign more than one category in woocommerce “update product” module.
i toggle on the “map” option and tried to assign the categories by their number.
when i enter only one number (one category) – it works fine. but if i try to assign 2 categories or more i get an error…

what could be the problem and how can i achieve my goal?
Thanks

1 Like

Welcome to the Make community!

When you are using the “Map” toggle, the field expects the same data structure as originally provided, and it might not just be a simple comma-delimited string - it could be an array or collection.

Can you take a screenshot of how the Categories of the product data bundle (Output) looks like in a previous module?

Or can you export that Output bundle and paste it above so we can see how it is structured?

2 Likes

hey samliew, i tried both array and collection, none worked, here is what i tried:
[21, 19] and {
“id”: 21,
“id”: 19
}
here is the output of the working bundle with two category selected:
“categories”: [
{
“id”: 20,
“name”: “test”,
“slug”: “buy-test”
},
{
“id”: 19,
“name”: “red”,
“slug”: “sell-red”
}
],

solution is mentioned in this link: