Dynamically Change Size Value for Google Product Feed
Google Shopping requires the size attribute in abbreviated format — S, M, L, XL. Most WooCommerce stores store size values as full words like “Small”, “Medium”, “Large”. If you send the full-word values, Google will not recognise them correctly, and your products may be disapproved.
Dynamic Attributes solve this by mapping your WooCommerce size labels to the Google-accepted abbreviations automatically — without changing any product data in your store.
📋 Google’s Size RequirementGoogle requires standardised size values. Sending “Small” instead of “S” or “Extra Large” instead of “XL” can cause size attribute errors in Merchant Center. Use this feature to remap values without editing individual products. Google’s official size attribute spec
Dynamically Change Size Value for Google Product Feed (Video Tutorial)
The Problem & Solution at a Glance
❌ What your store sends (rejected)
WooCommerce stores size as “Small”, “Medium”, “Large” — Google doesn’t accept these long-form values in the size attribute.
✅ What Google expects (accepted)
Google requires abbreviated values: “S”, “M”, “L”. Dynamic Attributes translates your store values to these automatically.
Size Mapping Reference
Set up one condition per size value. Use this table as your reference when building the conditions.
| WooCommerce Size (Condition Value) | Google Output (Pattern Value) |
|---|---|
| Small → | S |
| Medium → | M |
| Large → | L |
| Extra Large → | XL |
| Extra Small → | XS |
| Your custom size label → | Your abbreviation |
💡 Check Your Exact Size Labels First Go to Products → Attributes → Size in WordPress and note the exact spelling of each value. The condition match is case-sensitive — “small” will not match “Small”.
How to Set It Up With the CTX Feed Plugin?
📋 Before You Start: This uses Dynamic Attributes. If you haven’t created one before, read the How to Configure a Dynamic Attribute guide first.
Step 1: Go to CTX Feed → Dynamic Attributes → Add New. Give it a clear name, e.g. “Google Size Mapping”.
Step 2: Add the first condition: Size = “Small”
Set Product Attribute to Size (or whichever attribute you use), Condition to is / equal, and Value to Small. Set Output Type to Pattern and Output Value to S.

Step 3: Click “Add Condition” and repeat for each size value
Add one condition for each size label in your store — Medium → M, Large → L, XL → XL, and so on. You need a separate condition row for each mapping.
Step 4: Set a Default Value
Scroll to the bottom of the form and enter a fallback value (e.g. One Size or leave blank if no fallback applies. This is returned for any product whose size doesn’t match any condition.
Step 5: Save the dynamic attribute — then Clear Cache
Click Save to store the attribute.
⚠️ Clear the Cache After Saving. Go to CTX Feed → Manage Feed and click Clear Cache. Without clearing the cache, your new dynamic attribute will not show up in the feed attribute dropdown — even after saving.
Step 6: Map it to the Size field in your Google feed
Open your feed in CTX Feed → Make Feed. Find the Size attribute row, open the Store Attribute dropdown, and select your new dynamic attribute from the Dynamic Attributes group.

✅ Result Your Google Shopping feed will now send S, M, L, XL for each product based on its WooCommerce size value. Store data is unchanged — only the feed output is transformed.