Support » Plugin: WooCommerce » How to add 'Missing microdata for condition' to Products.

  • Hi,

    We’ve received an error for “Missing microdata for condition” from the Google Merchant Centre for over 100 products.

    There is no schema code on the product pages for the condition of our products.

    Would you be able to advise how to add the condition of our products into the schema mark-up on pages in our Motorhome Parts and Accessories Shop.

    We’re unsure if this is a theme or a WooCommerce error and what’s the best way to go about this issue.


Viewing 15 replies - 1 through 15 (of 26 total)
  • Plugin Author Mike Jolley


    The theme may be missing certain classnames on the product page wrappers. If you compare the markup and validation tool results against Twenty Twelve theme you should be able to spot the differences and confirm thats the issue.

    Thanks for the quick response, we looked at the page source for both our total theme and the twenty twelve theme and it’s both stating the same thing:

    <div itemprop="offers" itemscope itemtype="">
    	<p class="price"><span class="amount">&pound;194.00</span>&ndash;<span class="amount">&pound;224.00</span></p>
    	<meta itemprop="price" content="194" />
    	<meta itemprop="priceCurrency" content="GBP" />
    	<link itemprop="availability" href="" />

    Neither includes the condition of the product.

    It occurs to me that the product page doesn’t have an option to select the condition of the product?

    Plugin Author Mike Jolley


    Actually, that might not be one we include. condition isn’t required. If you need it, you can add it to the template files.

    As far as I’m aware Google require you to add condition into the product feed for Google Merchant Centre. They then scan the product page afterwards, comparing the data in the feed to the micro-data on the web-page. If there are any disparities or omissions the product is disapproved and is not visible in Google SERP.

    We would therefore like to find a way of adding a condition field into the product data and having this displayed in the micro-data on the page.

    Is this something you could help with as I’m sure it will affect many other people using Google to list their products?


    Plugin Author Mike Jolley


    Start here Shouldn’t be too hard to output it yourself and add the value to a custom field, or hardcoded.


    I have honestly spent several days trying to find out where to add the condition microdata, help please.

    I don’t know if this is red herring but if I use the inspect feature in Chrome I can see itemprops of “price”, “pricecurrency”, “availability” on my web pages. Chrome indicates it is part of div.summary.entry-summary? But I cannot find that aywhere. I am using child theme twenty-twelve.

    Any help would be gratefully received. Thank you.

    robingb has a clear description of this problem. truly amazing that woocommerce lets this one slide without a response. So anyone out there with a solution would be really appreciated. I am surprized there is no clear fix or plugin for this. I would pay for one.

    edit the woocommerce “content-single-product.php” template file (you should be using a child theme).

    and add this code on lines 80 – 81:

    <meta itemprop=”url” content=”<?php the_permalink(); ?>” />
    <meta itemprop=”itemCondition” content=”; />


    Well I had been looking for an answer to this for a while and Uriel1339 came to the rescue! It works and just wanted to say thanks!

    How do you create this file “content-single-product.php” in the child template?

    do you simply just copy it over and add that code?

    add this code on lines 80 – 81:

    <meta itemprop=”url” content=”<?php the_permalink(); ?>” />
    <meta itemprop=”itemCondition” content=”” />

    @da1999 – I take it you are using a child theme? You need to create a folder in your child theme called “woocommerce”. In that folder create another folder called “template”. In that folder add the file “content-single-product.php” then edit as you wish. If you ever want to copy a file to your child theme you need to copy the folder titles exactly as they appear in the main woocommerce folders. you don’t need to copy all the files only the files that you wish to edit.

    • This reply was modified 3 years, 6 months ago by stuartbartley. Reason: add user

    As Stuart says, except there should not be a templates folder in the child theme’s woocommerce folder. See:

    Make a note of what you did to modify content-single-product.php because Woo does update it occasionally.

    Hello all, I’ve been trying to add the code to lines 80 – 81:

    <meta itemprop=”url” content=”<?php the_permalink(); ?>” />
    <meta itemprop=”itemCondition” content=”” />

    on “content-single-product.php” and am having no success at all in addressing the issue at hand (which is getting an error for “Missing microdata for condition” from the Google Merchant Centre).

    Tried adding it elsewhere in the same php file, just can’t seem to get the desired effect.

    Maybe the file has been updated or something, I think Woo has recently been updated, any guidance would be greatly appreciated!



    None of the above things did work for me – and I think it´s related to woocommerce 3.0 using JSON-LD – and not XML / inline markup for the schema attributes.

    I solved it on my site by editing:

    and adding

    ‘itemCondition’ => ‘;,

    in line 207

    This is the quick n´ dirty solution. It will probably be overwritten in a future update of woocommerce. Next step will be to just override that specific function.

    Larsbuur, you are THE MAN!
    Added the code and the condition is showing as New in Google Structured Data Testing Tool.
    I’ll keep a store of the code for the next updates until Woo sort out this issue, I have NO IDEA why they would not have already addressed this issue.
    Much appreciated, this has been doing my nut in!


Viewing 15 replies - 1 through 15 (of 26 total)
  • The topic ‘How to add 'Missing microdata for condition' to Products.’ is closed to new replies.