Woocommerce - Create a product - Categories

Hi all,

When trying to create products in a secondary Woocommerce shop, (from an Airtable base), I need to lookup the products in our main shop first (to get all the data I need).

This works well, but the ‘categories’ results are giving me a real headache.

Here is my flow:

In “Create a Product” under Categories I have:

But whenever I run it I get the error:

I have made sure all categories from the main shop also exists in the secondary shop. But of course the ID’s of the categories are different.

Is this why they cannot be mapped, or is it because I am passing an array?

Thanks!

@Lars_Bach I didn’t test this out, but yes; if you are mapping categories you need to use IDs and not names like you are trying now.
Now if you are trying to map categories from another shop this won’t work, because they are different.

1 Like

Hi @Bjorn.drivn,

Thanks for the reply.

So one way to tackle this - I guess - would be if it went into the database of our secondary shop and manually forced changed the ids of our categories to match the ids from our main shop?

It’s a bit hacky, but if that would make it work I would be willing to live with that.

Actually, changing ID’s will probably be a mess. Since our categories rarely change, instead I will just add another column in Airtable with a single select that matches our categories from the main shop.

That way I should be able to map those instead to the secondary shop.