Knowledge Base
Deviking Product feeds Pro

Mapping WooCommerce Categories to External Feed Categories

WooCommerce categories are usually designed for your own store structure, while marketplaces, comparison engines, distributors, and other feed destinations may require a completely different category taxonomy.

For example, your WooCommerce store may use:

 
Clothing
└── Men's Clothing
    └── T-Shirts
 

while the receiving platform expects:

 
Apparel & Accessories > Clothing > Shirts & Tops
 

Deviking Product Feeds Pro lets you map your existing WooCommerce categories to the category names or IDs required by the destination without changing your store categories.

Category Mapping is reusable and can be assigned to one or more feeds.


Open Category Mapping

In WordPress Admin, go to:

Deviking Feeds → Category Mapping

Here you can create and manage reusable category maps.

A Category Mapping connects:

 
WooCommerce Category
→ External Category
 

For example:

 
T-Shirts
→ Apparel & Accessories > Clothing > Shirts & Tops
 

or:

 
T-Shirts
→ 212
 

if the destination requires a category ID instead of category text.


Create a New Category Mapping

Create a new Category Mapping and enter a descriptive name.

For example:

 
Marketplace Categories
 

or:

 
Distributor Category Mapping
 

A clear name is useful when several category mappings exist on the same site.


Map Your WooCommerce Categories

The Category Mapping table displays your WooCommerce product categories.

For each category, enter the corresponding external category value.

Example:

WooCommerce CategoryExternal Category
T-ShirtsApparel & Accessories > Clothing > Shirts & Tops
JeansApparel & Accessories > Clothing > Pants
Running ShoesApparel & Accessories > Shoes
SmartphonesElectronics > Mobile Phones
LaptopsElectronics > Computers > Laptops

The external value can be a category name, complete category path, code, or ID depending on the requirements of the feed destination.


Example Using External Category IDs

Some systems require category IDs instead of category names.

For example:

 
WooCommerce:
Running Shoes

External Category:
1254
 

The mapping would simply contain:

 
Running Shoes → 1254
 

The generated feed can then output:

 
<category>1254</category>
 

instead of the WooCommerce category name.


Search Large Category Lists

Stores with large catalogs may contain hundreds or thousands of WooCommerce categories.

Use the search field in Category Mapping to filter the category list and quickly find the categories you need to configure.

Searching the table does not modify the mapping. It only makes the category list easier to navigate.


Configure Unmapped Categories

Not every WooCommerce category needs to have an explicit mapping.

Deviking Product Feeds Pro provides a Fallback setting that controls what happens when a category does not have an external value configured.

Available options are:

Use original WooCommerce category name

The original WooCommerce category is exported.

Example:

 
WooCommerce Category:
Accessories

Mapped Value:
(empty)
 

Result:

 
Accessories
 

Return empty value

No category value is returned for unmapped categories.

Example:

 
WooCommerce Category:
Accessories

Mapped Value:
(empty)
 

Result:

 
(empty)
 

Use static fallback value

A fixed value is returned for every unmapped category.

For example:

 
Static Fallback:
Other
 

An unmapped category will return:

 
Other
 

This is useful when the destination requires every product to have a category.


Example Mapping with Fallback

Suppose your store contains:

 
T-Shirts
Jeans
Running Shoes
Accessories
 

and your Category Mapping contains:

 
T-Shirts
→ Apparel > Shirts

Jeans
→ Apparel > Pants

Running Shoes
→ Footwear
 

while:

 
Accessories
 

has no mapping.

If the fallback is:

 
Use original WooCommerce category name
 

the feed output becomes:

 
T-Shirts
→ Apparel > Shirts

Jeans
→ Apparel > Pants

Running Shoes
→ Footwear

Accessories
→ Accessories
 

If the fallback is:

 
Use static fallback value:
Other
 

then:

 
Accessories
→ Other
 

Assign the Category Mapping to a Feed

A Category Mapping can be assigned directly to feeds.

The Apply to Feeds setting is optional.

A mapping can be:

 
Unassigned
Assigned to one feed
Assigned to multiple feeds
 

This makes it possible to reuse the same external category taxonomy across several feeds.

For example:

 
Category Mapping:
Distributor Categories

Applied to:
Distributor XML
Distributor CSV
English Distributor Feed
 

All assigned feeds can use the same category mapping.


One Active Category Mapping per Feed

A feed can have one active Category Mapping at a time.

For example:

 
Feed:
Products XML

Active Category Mapping:
Marketplace Categories
 

If the same feed is later assigned to:

 
Distributor Categories
 

the feed is removed from the previous Category Mapping automatically.

This prevents multiple category maps from conflicting with each other.


Automatic Integration with Feed Category Sources

When a Category Mapping is assigned to a feed, the built-in category sources automatically use the mapped values.

This applies to:

 
Parent Category
Child Category
Category Path
 

You do not need to manually replace every category source in the feed.

For example, suppose WooCommerce contains:

 
Clothing
└── T-Shirts
 

and the Category Mapping contains:

 
Clothing
→ Apparel

T-Shirts
→ Shirts & Tops
 

A feed using:

 
Source:
Child Category
 

can return:

 
Shirts & Tops
 

instead of:

 
T-Shirts
 

Mapping a Full Category Path

The Category Mapping also works with Category Path.

Suppose WooCommerce contains:

 
Clothing
└── Men's Clothing
    └── T-Shirts
 

and your mapping contains:

 
Clothing
→ Apparel

Men's Clothing
→ Men

T-Shirts
→ Shirts & Tops
 

The mapped category path can become:

 
Apparel > Men > Shirts & Tops
 

instead of:

 
Clothing > Men's Clothing > T-Shirts
 

The feed’s configured Category Path separator is preserved.

For example, if the separator is:

 
 > 
 

the result can be:

 
Apparel > Men > Shirts & Tops
 

If it is:

 
 / 
 

the same path becomes:

 
Apparel / Men / Shirts & Tops
 

Parent and Child Category Sources

Category Mapping can also be used when only a specific part of the WooCommerce category hierarchy is required.

For example:

 
WooCommerce:
Electronics
└── Smartphones
 

with mappings:

 
Electronics
→ Consumer Electronics

Smartphones
→ Mobile Phones
 

Using:

 
Source:
Parent Category
 

can return:

 
Consumer Electronics
 

while:

 
Source:
Child Category
 

can return:

 
Mobile Phones
 

This lets you match the category structure required by the receiving platform.


Using the Category Mapping as a Mapping Source

Each saved Category Mapping also receives its own reusable source token:

 
catmap:<id>
 

The saved map can be selected from the Mapping Source selector for feeds where the map applies.

In most cases, assigning the Category Mapping to the feed and using:

 
Parent Category
Child Category
Category Path
 

is the easiest approach.

The dedicated Category Mapping source is available when a specific mapping source is required.


Example Feed Configuration

Suppose your store has:

 
WooCommerce Categories:

Electronics
├── Smartphones
└── Laptops
 

The external destination requires:

 
Consumer Electronics
├── Mobile Phones
└── Notebook Computers
 

Create:

 
Category Mapping:
External Electronics Categories
 

Configure:

 
Electronics
→ Consumer Electronics

Smartphones
→ Mobile Phones

Laptops
→ Notebook Computers
 

Assign the Category Mapping to:

 
Products XML
 

Then configure the feed:

 
Output Field:
category

Source:
Category Path
 

A smartphone product can now output:

 
<category>Consumer Electronics > Mobile Phones</category>
 

while a laptop can output:

 
<category>Consumer Electronics > Notebook Computers</category>
 

The WooCommerce category structure remains unchanged.


CSV Example

The same Category Mapping works in CSV feeds.

For example:

 
sku,title,category
PHONE-001,"Smartphone X","Consumer Electronics > Mobile Phones"
LAPTOP-001,"Notebook Pro","Consumer Electronics > Notebook Computers"
 

Category Mapping is not limited to XML feeds.


Products in Variations

When variations are exported as individual feed records, built-in category sources use the categories of the parent product.

For example:

 
Variable Product:
Running Shoes

Category:
Footwear > Running Shoes

Variations:
Black / 42
Black / 43
White / 42
 

If:

 
Running Shoes
→ Athletic Shoes
 

the variation records can use the mapped parent product category.

This avoids having to assign categories separately to individual variations.


Use Different Category Maps for Different Destinations

Different destinations may use completely different category structures.

For example, one destination may require:

 
Apparel > Shoes > Running
 

while another requires:

 
Fashion > Footwear > Sports Shoes
 

Create separate Category Mappings:

 
Marketplace A Categories
 

and:

 
Marketplace B Categories
 

Then assign each mapping to the appropriate feed.

For example:

 
Feed:
Marketplace A XML

Category Mapping:
Marketplace A Categories
 

and:

 
Feed:
Marketplace B CSV

Category Mapping:
Marketplace B Categories
 

Your WooCommerce categories remain unchanged while every feed receives the correct external taxonomy.


Reuse One Mapping Across Multiple Feeds

If multiple feeds use the same destination taxonomy, you do not need to duplicate the Category Mapping.

For example:

 
Category Mapping:
Distributor Categories
 

can be assigned to:

 
Distributor XML
Distributor CSV
Distributor English
 

This allows category changes to be maintained from one Category Mapping instead of editing every feed independently.


Updating an Existing Category Mapping

If the destination changes its taxonomy, simply edit the existing Category Mapping.

For example:

 
Old:
Running Shoes → Sports > Running

New:
Running Shoes → Footwear > Athletic Shoes
 

After saving the updated mapping, regenerate the feeds that use it.

The next generated files will use the updated category values.


Category Mapping Does Not Change WooCommerce

Category Mapping only changes the value written to the feed.

It does not:

 
rename WooCommerce categories
change category slugs
move products between categories
change the store navigation
change product URLs
 

For example:

 
WooCommerce:
T-Shirts
 

can remain exactly as it is in the store while the feed outputs:

 
Apparel & Accessories > Clothing > Shirts & Tops
 

Category Mapping vs Category Filtering

Category Mapping and category filtering perform different tasks.

Category Mapping changes the category value exported to the feed:

 
Running Shoes
→ Athletic Footwear
 

The product remains in the feed.

Category Filters determine which products are included in the feed:

 
Include Category:
Running Shoes
 

or:

 
Exclude Category:
Accessories
 

A product can therefore be selected through category filtering and then have its category name converted through Category Mapping.


Category Mapping vs Dynamic Attributes

Use Category Mapping when you need a reusable conversion between WooCommerce categories and an external category taxonomy.

For example:

 
T-Shirts
→ Shirts & Tops
 

Use a Dynamic Attribute when the required output depends on IF / ELSE conditions involving product data.

For straightforward category taxonomy conversion, Category Mapping is the simpler and more maintainable option.


Recommended Workflow

For a new category mapping:

  1. Go to Deviking Feeds → Category Mapping.
  2. Create a new Category Mapping.
  3. Enter a descriptive Map Name.
  4. Map the required WooCommerce categories to external category names or IDs.
  5. Choose the fallback behavior for unmapped categories.
  6. Assign the mapping to the required feed or feeds.
  7. Save the Category Mapping.
  8. Open the feed.
  9. Map the required category output field using Parent Category, Child Category, or Category Path.
  10. Save the feed.
  11. Run Preview and inspect products from several different categories.
  12. Run Validate Feed.
  13. Use Save & Generate when the result is correct.

Example Complete Setup

WooCommerce:

 
Fashion
├── T-Shirts
├── Jeans
└── Running Shoes
 

External taxonomy:

 
Fashion
T-Shirts     → Apparel > Shirts
Jeans        → Apparel > Pants
Running Shoes → Footwear > Athletic Shoes
 

Category Mapping:

 
Map Name:
Marketplace Categories

Fallback:
Use original WooCommerce category name

Apply to Feeds:
Marketplace XML
 

Feed Mapping:

 
Output Field:
category

Source:
Category Path
 

Possible output:

 
<category>Fashion > Apparel > Shirts</category>
 

or:

 
<category>Fashion > Footwear > Athletic Shoes</category>
 

Using Category Mapping, each feed can follow the exact taxonomy required by its destination while your WooCommerce category structure remains untouched.