{"id":18736609,"date":"2025-11-29T17:54:39","date_gmt":"2025-11-29T17:54:39","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/problematic-attribute-handling\/"},"modified":"2025-11-29T17:54:39","modified_gmt":"2025-11-29T17:54:39","slug":"problematic-attribute-handling","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/problematic-attribute-handling\/","title":{"rendered":"Problematic attribute handling"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">The output of all all of Google\u2019s attributes in an xml file are cluttered as it is when using this plugin, as this plugin doesn\u2019t remove empty attributes in products where the attributes are empty. <br \/>But even if we ignore that and keep the empty tags, the real problem I found was specifically with the handling of the Google\u2019s attribute product_detail.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When submitting a feed to Google Shopping, I rely heavily on the Google attribute product_detail, as it allows to submit a great amount of custom attributes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Unfortunately, this plugin doesn\u2019t output the product_detail attribute in a way that complies with Google instructions.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The attribute product_detail includes 3 sub-attributes: section_name (optional), attribute_name (required), attribute_value (required).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The input mechanism for product_details in this plugin is not very good and the output it provides is problematic.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When using xml, if certain products don\u2019t have values for certain attributes that use product_detail, instead of omitting the attribute altogether or, for the very least, omitting the attribute_name, the plugin outputs the actual attribute name while leaving it hanging without a value. <br \/>For example (and I&#8217;ve replaced the html tags with parentheses): <br \/>(g:product_detail) <br \/>(g:attribute_name)Resolution(\/g:attribute_name) <br \/>(g:attribute_value\/) <br \/>(\/g:product_detail)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the case of outputting the feed in a tsv format it\u2019s even worse, as the product_detail column would just include the specific attribute name without any context to what it is or to what Google should do with that word, whether it\u2019s a section_name, attribute_name or an attribute_value. <br \/>And when the tsv file does have a product that has both an attribute_name and an attribute_value, but not a section_name (as it\u2019s optional), it incorrectly outputs it like this: <br \/>Resolution:4k <br \/>Instead of the way Google instructs to output it in the tsv format, which is to start with a colon(:) to indicate there is no section_name. Like this: <br \/>:Resolution:4k<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Other than that, if you don\u2019t need to use the Google Shopping feed, the plugin does offer some extra options for feed customization.<\/p>\n","protected":false},"template":"","class_list":["post-18736609","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/18736609","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/18736609\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=18736609"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}