When you are creating a Product Feed of your WooCommerce store for your preferred merchant, sometimes you may find some attribute values are showing the correct data but with the wrong format. Or perhaps you may need to modify the current attribute value to meet your merchant’s feed specification.
The “Output Filter” option can help you in this way.
When you are creating a new feed or editing an existing feed with the Product Feed Manager, on the right side of the attributes you will find a dropdown option “Output Filter”.
For example, if you want to remove the decimal segment from your price attribute, simply select the “Price” from the Output Filter of Price attribute, and it will remove the decimal segments from your price attribute.
More to that, you can also select multiple Output Filters together too. For example, if can use the Strip Tags and the UTF-8 Encode Output Filters together to filter your feed attribute value.
Let me show the Output Filter options and their purposes:
Click on the Output Sanitization dropdown, and you will the following options:
Here you will get the following options:
- Strip Tags
- UTF-8 Encode
- Remove Space
- First Word Uppercase only
- Remove ShortCodes
- Remove ShortCodes and Strip Tags
- Remove Special Character
- CDATA Without Space
- Remove Undersoce
- Decode URL
- Remove decimal points
- Two decimal points
- Decimal separator – Comma (,)
- Remove hyphen
- Remove hyphen (space)
- Replace space with hyphen
Default: It will keep the attribute value as it is.
UTF-8 Encode: It will encode the UTF-8 values of the attributes.
htmlentities: htmlentities will convert the HTML entities into symbols.
Integer: Selecting Integer will only keep the integers from the attribute value.
Price: Price will remove the decimal segment from the attribute value.
Remove Space: This Sanitization filter will remove the spaces from the attribute value.
First Word Uppercase Only: This output filter will only keep the first word as uppercase in a sentence.
Remove ShortCodes: It is one of the most important Sanitizations that will remove all the shortcodes from your attribute value.
Remove ShortCodes and Strip Tags: Using this Sanitization will remove all the tags and the shortcodes from your attribute value.
Remove Special Character: Selecting this will remove any special characters from your attribute value.
CDATA: CDATA means, Character Data, it will put the attribute value into the CDATA tags.
CDATA Without Space: This Sanitization will put the attribute value into the CDATA tags, and there won’t be any space after the CDATA tag.
Remove decimal points: Selecting this Sanitization will remove the decimal points from the attribute value.
Two decimal points: Selecting this Sanitization will show two decimal points of the attribute value.
Decimal Separator – Comma (,): This will replace any decimal point with a comma (,) value.
Remove hyphen: This will remove any hyphen from the attribute value.
Remove hyphen (Space): This will remove any hyphen from the attribute value – hyphen with spaces.
Replace space with hyphen: This Sanitization will replace all the spaces with hyphens.
Now, select the required Output Sanitization for the concerned attribute and publish the feed.
Once the feed is published, then you will see that the attribute result has changed within the feed file.