Knowledge Base
Deviking Product feeds Pro

Replacing Text Inside Feed Values

Sometimes WooCommerce contains product data that is correct for your website but needs to be formatted differently for a marketplace, distributor, advertising platform, or another feed destination.

For example, your store may contain:

 
Blue Cotton T-Shirt Small
 

while the receiving platform expects:

 
Blue Cotton T-Shirt S
 

Deviking Product Feeds Pro can change text directly in the generated feed using the Replace Text transformation.

The original WooCommerce product data remains unchanged.


How Replace Text Works

Each Mapping row can apply one transformation to the resolved source value.

To replace text, select:

 
Transform:
Replace Text
 

The replacement parameter uses:

 
search=>replacement
 

For example:

 
Small=>S
 

means:

 
Find:
Small

Replace with:
S
 

If the source value is:

 
Blue Cotton T-Shirt Small
 

the generated feed value becomes:

 
Blue Cotton T-Shirt S
 

Configure a Text Replacement

Open:

Deviking Feeds → Feeds

Edit the required feed and go to Mapping.

Find the field you want to modify.

For example:

 
Output Field:
title

Source:
Name / Title
 

Select:

 
Transform:
Replace Text
 

and enter:

 
Small=>S
 

Save the feed and use Preview to confirm the result.


Example: Replace Text in a Product Title

WooCommerce value:

 
Blue Cotton T-Shirt Small
 

Mapping:

 
Output Field:
title

Source:
Name / Title

Transform:
Replace Text

Parameter:
Small=>S
 

Feed output:

 
Blue Cotton T-Shirt S
 

The WooCommerce product title remains:

 
Blue Cotton T-Shirt Small
 

Only the feed value changes.


XML Example

WooCommerce:

 
Name:
Blue Cotton T-Shirt Small
 

Mapping:

 
Output Field:
title

Source:
Name / Title

Transform:
Replace Text

Parameter:
Small=>S
 

Generated XML:

 
<title>Blue Cotton T-Shirt S</title>
 

CSV Example

The same transformation works in CSV feeds.

Generated CSV:

 
sku,title
TSHIRT-001,"Blue Cotton T-Shirt S"
 

Replace Brand Names

Replace Text can also be useful when a destination expects a different version of a brand name.

For example, WooCommerce contains:

 
Example Company Ltd
 

while the feed should contain:

 
Example Company
 

Configure:

 
Output Field:
brand

Source:
Product Brand

Transform:
Replace Text

Parameter:
Example Company Ltd=>Example Company
 

The feed result becomes:

 
Example Company
 

without modifying the brand stored in WooCommerce.


Replace Text in Descriptions

The same transformation can be applied to description fields.

For example:

 
Source:
Description

Transform:
Replace Text

Parameter:
Old Product Name=>New Product Name
 

Source:

 
This accessory is compatible with Old Product Name.
 

Feed result:

 
This accessory is compatible with New Product Name.
 

Replace Category Separators

Replace Text can also modify separators contained inside a resolved category value.

For example, suppose the generated Category Path is:

 
Clothing > Men > Shirts
 

but the receiving system expects:

 
Clothing | Men | Shirts
 

Configure:

 
Output Field:
category

Source:
Category Path

Transform:
Replace Text

Parameter:
>=>|
 

The final feed value becomes:

 
Clothing | Men | Shirts
 

For category paths specifically, remember that Deviking Product Feeds also provides a dedicated Category Path separator setting. If the only requirement is to change the category hierarchy separator for the entire feed, changing that setting is usually simpler.


Replace Text from a Custom Field

Detected WooCommerce custom/meta fields can also use Replace Text.

For example:

 
Output Field:
condition

Source:
meta:_supplier_condition

Transform:
Replace Text

Parameter:
Factory New=>New
 

If the custom field contains:

 
Factory New
 

the feed exports:

 
New
 

Replace Text in Product Attributes

WooCommerce product attributes can also be used as the source.

For example:

 
Output Field:
size

Source:
Size

Transform:
Replace Text

Parameter:
Extra Large=>XL
 

The feed can therefore output:

 
XL
 

while WooCommerce continues to display:

 
Extra Large
 

Replace Text vs Value Map

Deviking Product Feeds also provides Value Map, but the two transformations serve different purposes.

Use Replace Text when you want to replace matching text inside a larger value.

Example:

 
Source:
Blue T-Shirt Small

Replace Text:
Small=>S

Result:
Blue T-Shirt S
 

Use Value Map when you want to translate complete values.

Example:

 
Small=>S;
Medium=>M;
Large=>L;
Extra Large=>XL
 

This is particularly useful for fields such as:

 
Size
Availability
Gender
Condition
Brand codes
Custom classifications
 

A useful rule is:

 
Change part of a longer string
→ Replace Text

Translate several complete known values
→ Value Map
 

Example: Size Normalization

If the source itself contains only:

 
Extra Large
 

and you simply need:

 
XL
 

you can use:

 
Transform:
Replace Text

Parameter:
Extra Large=>XL
 

However, if the catalog contains several possible sizes:

 
Extra Small
Small
Medium
Large
Extra Large
 

then Value Map is generally more appropriate:

 
Extra Small=>XS;
Small=>S;
Medium=>M;
Large=>L;
Extra Large=>XL
 

Replace Text After a Fallback Source

Replace Text is applied after Deviking Product Feeds resolves the primary Source and any Fallback Source.

For example:

 
Output Field:
brand

Source:
Product Brand

Fallback Source:
Brand

Transform:
Replace Text

Parameter:
Example Company Ltd=>Example Company
 

The processing flow is:

 
Source
↓
Fallback Source if Source is empty
↓
Replace Text
↓
Prefix / Suffix
↓
Feed output
 

This means the replacement is applied to whichever value was ultimately resolved.


Example with Fallback

Product A:

 
Product Brand:
Example Company Ltd

Brand Attribute:
(empty)
 

Result:

 
Example Company
 

Product B:

 
Product Brand:
(empty)

Brand Attribute:
Example Company Ltd
 

The fallback resolves the Brand Attribute first, and then Replace Text converts it to:

 
Example Company
 

Replace Text Before Prefix and Suffix

Transformations run before Mapping Prefix and Suffix are added.

For example:

 
Source:
Name / Title

Transform:
Replace Text

Parameter:
Large=>L

Prefix:
Product: 
 

Source:

 
Running Shoes Large
 

After Replace Text:

 
Running Shoes L
 

Final output:

 
Product: Running Shoes L
 

Product Data Is Not Modified

Replace Text only affects the generated feed.

It does not modify:

 
WooCommerce product titles
Descriptions
Attributes
Categories
Custom fields
Brands
Database values
 

For example:

 
WooCommerce:
Blue Cotton T-Shirt Small
 

can produce:

 
Feed A:
Blue Cotton T-Shirt S
 

while the original product still remains:

 
Blue Cotton T-Shirt Small
 

This also means different feeds can format the same WooCommerce data differently.


Different Replacements for Different Feeds

Each feed has its own Mapping configuration.

For example:

Marketplace A

 
Source:
Size

Transform:
Replace Text

Parameter:
Extra Large=>XL
 

Distributor B

 
Source:
Size

Transform:
Replace Text

Parameter:
Extra Large=>X-Large
 

The same WooCommerce product can therefore generate different output according to each destination’s requirements.


Replace Text vs Dynamic Attributes

Use Replace Text when the value simply needs text substitution.

For example:

 
Example Company Ltd
→ Example Company
 

Use a Dynamic Attribute when the output depends on conditions.

For example:

 
IF Brand = Example Company
→ return one value

ELSE
→ return another value
 

Dynamic Attributes are intended for conditional logic, while Replace Text is intended for straightforward text substitution.


Only One Transform per Mapping Row

Each Mapping row uses one Transform.

For example:

 
Transform:
Replace Text
 

or:

 
Transform:
Value Map
 

or:

 
Transform:
Number Format
 

A Mapping row does not apply several different Transform types sequentially.

Choose the transformation that best matches the required output.

Prefix and Suffix remain separate from the Transform and can still be used with Replace Text.


Example: Rename Text and Add a Suffix

WooCommerce value:

 
Premium Coffee Old Edition
 

Configuration:

 
Output Field:
title

Source:
Name / Title

Transform:
Replace Text

Parameter:
Old Edition=>Classic

Suffix:
 - EU
 

Result:

 
Premium Coffee Classic - EU
 

The processing order is:

 
Premium Coffee Old Edition
↓
Replace Text
Premium Coffee Classic
↓
Suffix
Premium Coffee Classic - EU
 

Preview the Replacement

After configuring Replace Text:

  1. Save the feed.
  2. Run Preview.
  3. Find products containing the search text.
  4. Confirm that the expected text is replaced.
  5. Check products that do not contain the search text.
  6. Confirm any Prefix or Suffix settings.
  7. Run Validate Feed.
  8. Use Save & Generate when the output is correct.

Recommended Use Cases

Replace Text is useful for cases such as:

 
Small
→ S
 
 
Old Brand Name
→ New Brand Name
 
 
Example Company Ltd
→ Example Company
 
 
Clothing > Men
→ Clothing | Men
 
 
Old Product Line
→ New Product Line
 

and other situations where part of an existing feed value must be changed without modifying the WooCommerce catalog.


Quick Configuration Example

To change:

 
Blue Cotton T-Shirt Small
 

into:

 
Blue Cotton T-Shirt S
 

configure:

 
Output Field:
title

Source:
Name / Title

Transform:
Replace Text

Parameter:
Small=>S
 

Then save the feed and use Preview to verify the final value.

Replace Text provides a simple way to adapt WooCommerce content to the formatting requirements of individual feed destinations while leaving the original store data untouched.