WP All Import – Products belonging to multiple Grouped Products
I needed some help importing Woo Products with WP All Import. I have an excel that has some columns that describe the grouped product one product belongs to. If it was one grouped product a product belongs to, it is set up like in the picture below and works like a charm
My problem is that the products in my excel file have multiple grouping columns, meaning that one product may belong to many groups. Currently WP All Import does not support that and I need some help building a function to loop through these columns and add each product to all groups.
I already talked with Soflyy support and they responded that multiple grouping is not supported and needs to be customized with a custom php function on the importer. They said and I quote “The ‘get_children’ and ‘set_children’ methods noted at https://docs.woocommerce.com/wc-apidocs/class-WC_Product_Grouped.html should help (you’ll need to work out getting the post ID for each of the child products so they can be added to the parent).”, but I have trouble implementing it.
Thanks in advance for any help