Support » Plugin: WooCommerce » CSV Import Category Issue

  • Resolved NicheLabs


    Running WordPress 4.9.6 and Woocommerce 3.4.3
    I’m importing thousands of products (cornhole boards, bags, and other items) and creating categories as they import.

    I’ve run into an issue with the categories and wonder if this is a bug or if I’m doing something wrong.

    The issue is that a lot of these products are sports based so I have category trees based on product type > league > team. But I also need to see all products for a team.

    Based on that I’ve tried to setup the category field in the import file similar to the following:

    “Bean Bags > NFL > Atlanta Falcons,NFL > Atlanta Falcons”
    “Board Sets > NFL > Atlanta Falcons,NFL > Atlanta Falcons”

    But what appears to be happening is that it is finding that NFL > Atlanta Falcons already exists under Bean Bags so rather than creating the new parent category NFL it just assigns it under the Bean Bags > NFL category.

    How can I get it to create NFL as both a subcategory of a product type AND also as a parent category?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support ryanr14


    Hi there,

    One thing I thought you could try is if you are using commas add a backspace before the comma. Here is what my export looks like when I have a comma in a subcategory name.

    Link to image:

    Link to image:

    I’m not certain it’ll work, but it’s worth a try.

    • This reply was modified 2 years, 4 months ago by ryanr14.


    The issue isn’t that there are commas in the category name. I’m using commas to separate the different categories I want to assign it to as per the documentation.

    The category names themselves do not contain commas.

    The issue appears to be that since the category name matches an existing subcategory, it is assigning the product to that subcategory (see my example above).

    I tried manually creating the new parent category in hopes that it would see that and then add it to the correct category.

    For example:
    I manually created NFL as a top level category. But the product for NFL > Atlanta Falcons was still added to Bean Bags > NFL > Atlanta Falcons.

    I’s assuming it’s due to the ID number since Bean Bags > NFL was created before I manually created the parent of NFL, so it is found first. Either that or maybe the slug.

    I’m still playing with different ideas on how to solve this but any help would be greatly appreciated.



    I’ve resolved this issue. It appears that the issue was two fold:
    1 – The top level category for the league (e.g. NFL) did not exist, so rather than creating a new top level category, the import found an existing category that matched (e.g. Board Sets > NFL).

    2 – When I manually created the top level categories the slug was nfl-2 because NFL under Board Sets had a slug of just nfl.

    When I changed the slugs for all the leagues under Board Sets (e.g. nfl-board-sets) and then changed the top level slugs (e.g. nfl-2 to nfl) the import worked as I needed it to.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘CSV Import Category Issue’ is closed to new replies.