Title: Adding static values clears whole feed
Last modified: September 6, 2021

---

# Adding static values clears whole feed

 *  Resolved [joeoak](https://wordpress.org/support/users/joeoak/)
 * (@joeoak)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/adding-static-values-clears-whole-feed/)
 * Hello,
 * I’m trying to age_group as an field in a Facebook feed.
    First I add age_group
   in the field mapping and set a static value to “adult”. But since we got kids
   products as well I make an filter that says “If Product Name contains “youth”
   then set “age_group” to “kids””
 * First of all their is no age_group field to be selected in the “Then” column 
   of the filter settings. So instead I use the “static value” and set it to “age_group”
   or also I tried “g:age_group”.
 * Then I save it and fetch a new feed. If I do this the whole feed gets deleted
   and all the field mappings disappear returning a feed that just contains a lot
   of <item> attributes with no values inside.
 * This does even happens if I try to create a custom field mapping called “custom_age_group”
   and set the same filter but with Then column as “custom_age_group”. Then the 
   same procedure appears and clears the whole feed and deleting all the field mappings.

Viewing 8 replies - 1 through 8 (of 8 total)

 *  [supportadtribes](https://wordpress.org/support/users/supportadtribes/)
 * (@supportadtribes)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/adding-static-values-clears-whole-feed/#post-14842626)
 * Thanks for using our plugin and reaching out to us. With regards to your comments:
 * > First I add age_group in the field mapping and set a static value to “adult”.
   > But since we got kids products as well I make an filter that says “If Product
   > Name contains “youth” then set “age_group” to “kids””
 *  –> that most likely won’t work as static values cannot be overwritten by rules
 * > First of all their is no age_group field to be selected in the “Then” column
   > of the filter settings. So instead I use the “static value” and set it to “
   > age_group” or also I tried “g:age_group”.
 *  –> that is correct, the drop-downs only show the attributes and custom fields
   you have in WooCommerce. Those are the attributes and custom field you map to
   Facebook’s g:age_group field. So make sure to create the rules on the attribute
   that you have mapped to Facebook’s g:age_group field.
 *  Thread Starter [joeoak](https://wordpress.org/support/users/joeoak/)
 * (@joeoak)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/adding-static-values-clears-whole-feed/#post-14843244)
 * Yes, but this is not an answer to the problem.
    The problem is if I do as I was
   writing and as your answer stating that is correct then the whole feed gets corrupt
   and all my field mappings disappear — So I have to re-create all the field mappings
   from scratch (This happened to me 4 times now).
 * Eg. You got a bug that you need to fix.
 * Right now I can’t add age_group to the feed because it will cause the bug, clear
   all my field mappings, and make a corrupt XML with only <item> attributes in 
   a long row.
 * Please check into this issue.
 *  [supportadtribes](https://wordpress.org/support/users/supportadtribes/)
 * (@supportadtribes)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/adding-static-values-clears-whole-feed/#post-14843271)
 * We cannot reproduce this. Adding a field mappings works fine to us. Please see
   the video below where we add two field mappings and map those to some attributes:
   
   [https://www.dropbox.com/s/2syu888cbuiajty/addingfields.mov?dl=0](https://www.dropbox.com/s/2syu888cbuiajty/addingfields.mov?dl=0)
 * As you can see it is not clearing the field mappings for us.
    Can you share a
   screenvideo as well to show what you are doing and what is happening for you?
 *  Thread Starter [joeoak](https://wordpress.org/support/users/joeoak/)
 * (@joeoak)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/adding-static-values-clears-whole-feed/#post-14843350)
 * Yes, here you go [https://www.dropbox.com/s/xsqujkxkxbauqg4/Screen%20Recording%20min.mov?dl=0](https://www.dropbox.com/s/xsqujkxkxbauqg4/Screen%20Recording%20min.mov?dl=0)
 * Had to downscale the video to 480p.
    But as you can see it clearly happens and
   also it’s an bug where you can’t choose “static value” in filter if you haven’t
   saved it before.
 * Another thing is that it would be nice to be able to search in the list, and 
   not by just using a regular <select> HTML element since it’s mayhem to find in
   the long list of attributes available.
 *  [supportadtribes](https://wordpress.org/support/users/supportadtribes/)
 * (@supportadtribes)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/adding-static-values-clears-whole-feed/#post-14843385)
 * Thanks for this. You are still creating a rule that is not allowed. When you 
   remove that rule than the feed probably will be fine.
 * See our answer here: “that is correct, the drop-downs only show the attributes
   and custom fields you have in WooCommerce. Those are the attributes and custom
   field you map to Facebook’s g:age_group field. So make sure to create the rules
   on the attribute that you have mapped to Facebook’s g:age_group field.”
 *  Thread Starter [joeoak](https://wordpress.org/support/users/joeoak/)
 * (@joeoak)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/adding-static-values-clears-whole-feed/#post-14843738)
 * Yes,
 * But how can I then create a rule on age_group when it’s not available in the 
   list?
    And how come it’s an invalid rule when you clearly can choose “static 
   value” as an attribute?
 * The easiest is if you could tell how I can set “age_group” to a static value 
   of “adult” and then create a rule that changes “age_group” to “kids” if the product
   name contains “youth”.
 * How do I do that?
 *  [supportadtribes](https://wordpress.org/support/users/supportadtribes/)
 * (@supportadtribes)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/adding-static-values-clears-whole-feed/#post-14843970)
    - You first need to create a new WooCommerce attribute for that, lets name it“
      static age group”: [https://www.dropbox.com/s/2z4widb3vwm0sx6/static-age-group-1.png?dl=0](https://www.dropbox.com/s/2z4widb3vwm0sx6/static-age-group-1.png?dl=0)
    - Now map that newly created attribute to Google’s g:age_group field: [https://www.dropbox.com/s/ylejfj509pqpo0l/static-age-group-2.png?dl=0](https://www.dropbox.com/s/ylejfj509pqpo0l/static-age-group-2.png?dl=0)
    - And now create these two rules: [https://www.dropbox.com/s/lv312j1wqcp73n4/static-age-group-3.png?dl=0](https://www.dropbox.com/s/lv312j1wqcp73n4/static-age-group-3.png?dl=0)
    - Which will result to this in your feed: [https://www.dropbox.com/s/as6cssfmatwk59k/static-age-group-4.png?dl=0](https://www.dropbox.com/s/as6cssfmatwk59k/static-age-group-4.png?dl=0)
 * Hope this helps?
 *  [supportadtribes](https://wordpress.org/support/users/supportadtribes/)
 * (@supportadtribes)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/adding-static-values-clears-whole-feed/#post-14958761)
 * Hi,
 * Assuming the issue at hand has been resolved or our support is no longer required
   I am going to close this topic for housekeeping reasons now.
 * Please do not hesitate to reach out to our support-team again whenever you need
   our help.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Adding static values clears whole feed’ is closed to new replies.

 * ![](https://ps.w.org/woo-product-feed-pro/assets/icon-256x256.png?rev=3111496)
 * [Product Feed PRO for WooCommerce by AdTribes – Product Feeds for WooCommerce](https://wordpress.org/plugins/woo-product-feed-pro/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woo-product-feed-pro/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woo-product-feed-pro/)
 * [Active Topics](https://wordpress.org/support/plugin/woo-product-feed-pro/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woo-product-feed-pro/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woo-product-feed-pro/reviews/)

 * 8 replies
 * 2 participants
 * Last reply from: [supportadtribes](https://wordpress.org/support/users/supportadtribes/)
 * Last activity: [4 years, 8 months ago](https://wordpress.org/support/topic/adding-static-values-clears-whole-feed/#post-14958761)
 * Status: resolved