On this page
What this issue is
Schema markup is a block of code (usually JSON-LD) that tells search engines facts about a page. On a product page, the offers object includes an availability property. Its value comes from the schema.org list: InStock, OutOfStock, SoldOut, PreOrder, BackOrder, LimitedAvailability, Discontinued and others.
{
"@context": "https://schema.org",
"@type": "Product",
"name": "Trail Backpack 30L",
"offers": {
"@type": "Offer",
"price": "89.00",
"priceCurrency": "USD",
"availability": "https://schema.org/InStock"
}
}Why it costs you leads or sales
Google can show availability in search results and Merchant listings. If it shows "In stock" and the visitor lands on a sold-out page, they leave. That wastes the click, and if you run Shopping or product ads, it wastes ad spend too.
- Search resultShows "In stock" from schema
- Click to product pageVisitor arrives expecting to buy
- Sold out buttonPage shows the real status
- Visitor leavesGoes to a competitor
The break is in the markup, so every later step is wasted.
Example: 100 clicks a month on a sold-out product. Illustrative numbers only.
How to check if your site has it
Find a sold-out product
Open a product page that shows Sold out, Out of stock or a disabled Add to cart button.
View the structured data
Paste the URL into Google's Rich Results Test, or open the page source and search for
availability.Compare the values
If the page says sold out but the markup says
InStock, you have the issue.Check variants
If the product has sizes or colours, test a sold-out variant and an available one. Some themes only output the first variant's status.
Check Search Console
In Search Console, open Shopping > Merchant listings and look for availability warnings or mismatches. This report only appears if Google found product data.
How to fix it
The goal is one source of truth: the same stock data that drives the button should drive the markup. The right fix depends on how your schema is produced.
Turn on stock management
In WooCommerce, edit the product and open Inventory. Tick Manage stock or set Stock status to Out of stock. WooCommerce's own schema reads this value.
Find duplicate schema
If an SEO plugin or the theme also outputs Product schema, one of them may hardcode InStock. Disable the extra Product schema in the plugin's schema settings.
Clear caches
Purge your caching plugin and any CDN so the new markup is served.
Inspect the theme code
In Online Store > Themes > Edit code, search for
availabilityin product templates and snippets (oftenstructured-dataorproduct.liquid).Use the live variant state
Replace any hardcoded value with a condition on
product.selected_or_first_available_variant.available, as shown in the Liquid snippet below.Check apps
SEO or review apps may add their own Product schema. Turn off the duplicate in the app settings.
Find the Custom HTML tag
If schema is injected through a tag, open it and look for a fixed
availabilitystring.Read stock from the page
Pull the status from a data layer variable or a page element and build the value from it. Prefer server-rendered markup if you can, since injected schema can be missed by some crawlers.
Preview and publish
Use Preview mode on a sold-out product, then publish.
Open the CMS template
If schema is in the template's custom code, check for a fixed InStock value.
Add a stock field
Add an Option or Switch field (for example Availability) to the collection and bind it into the JSON-LD with a conditional.
For Ecommerce products
Check whether the schema comes from your custom code, since Webflow does not read it from the inventory setting automatically.
Check Wix Stores inventory
In the product's Inventory section, set the item to Out of stock or track quantity.
Review custom markup
If you added JSON-LD through Settings > Advanced SEO or a custom code block, edit or remove any hardcoded availability.
Check stock settings
In the product's Inventory, set stock or tick Sold out so the page shows the real status.
Review code injection
Check Settings > Advanced > Code Injection and the page's own injection for hardcoded Product JSON-LD.
Generate the value server-side
Map your stock field to a schema.org URL when you render the page, never as a fixed string.
Cover every state
Handle sold out, preorder, backorder and discontinued, not just in stock.
Invalidate caches on stock change
Purge the page cache when inventory changes.
"availability": {% if product.selected_or_first_available_variant.available %}"https://schema.org/InStock"{% else %}"https://schema.org/OutOfStock"{% endif %}<?php
$map = [
'instock' => 'https://schema.org/InStock',
'outofstock' => 'https://schema.org/OutOfStock',
'onbackorder' => 'https://schema.org/BackOrder',
];
$availability = $map[$product->stock_status] ?? 'https://schema.org/OutOfStock';
?>
"availability": "<?php echo $availability; ?>"Before
- Hardcoded InStock in the theme
- Sold-out page still advertises stock
- Cached markup never updates
After
- Value read from live stock status
- OutOfStock shown when sold out
- Cache cleared when inventory changes
How to confirm it's fixed
- Rich Results Test shows OutOfStock on a sold-out product
- An in-stock product still shows InStock
- A sold-out variant and an available variant each give the right value
- The view-source output matches the visible button
- Cache purged and the live URL retested in a private window
- Search Console URL Inspection: Request indexing for key product pages
Google can take days or weeks to recrawl and update how a page appears in results. Requesting indexing in Search Console can speed this up for important URLs, but does not guarantee timing.
How to prevent it happening again
- Keep one source of Product schema (theme, SEO plugin or app, not several)
- Never hardcode availability in templates
- Test a sold-out product after theme, plugin or app updates
- Purge caches automatically on inventory changes
- Review the Merchant listings report in Search Console monthly
- Spot-check a few sold-out and back-in-stock products after each sale or restock
How FunnelGuard handles this
FunnelGuard does not check this yet. Comparing schema availability with the visible stock status is a possible future check, but it is not part of the product today.
What FunnelGuard does cover nearby: a robot visitor runs your real customer journeys on a schedule, such as checkouts, lead forms and booking buttons, and checks each step and the tracking hits sent to ad and analytics platforms. If a broken product page stops the journey, you get one alert with a screenshot and a likely cause. It will not tell you that your markup says InStock.
To watch for this issue today, use the Rich Results Test on a sold-out product after changes, keep an eye on Search Console's Merchant listings report, and spot-check the page source. A free read-only website audit from FunnelGuard is available, though it is not a schema stock check.
Questions people ask
Why does my product schema say InStock when it's sold out?
Usually the theme, plugin or app hardcodes InStock or does not read the live stock status. It can also be a cached page serving old markup. Find where the Product schema is generated and make it read the real inventory value.
Does Google penalise wrong availability in schema?
Google's guidelines say structured data must match the visible page. Mismatches can trigger Merchant listing warnings and may make a page ineligible for rich results. A manual action is less likely for a simple stock error, but fix it promptly.
What is the correct schema value for a sold-out product?
Use https://schema.org/OutOfStock. For items you will restock, BackOrder or PreOrder may fit better. Use Discontinued if the product is gone for good.
How do I check my schema availability?
Paste the product URL into Google's Rich Results Test, or view the page source and search for availability. Do this on a product that is actually sold out and compare the value with what the page shows.
How do I fix wrong availability in Shopify schema?
Edit your theme code in Online Store > Themes > Edit code and find the availability line. Replace any fixed value with a condition on product.selected_or_first_available_variant.available. Also turn off duplicate schema from apps.
How long does Google take to update availability after I fix it?
It depends on how often Google recrawls the page, so it can take days or weeks. You can request indexing in Search Console's URL Inspection tool for important pages. Merchant Center feeds, if you use them, can also affect what is shown.
Does FunnelGuard detect wrong schema availability?
No. FunnelGuard does not check schema availability yet; it is a possible future check. It does monitor your real customer journeys and tracking, so it can alert you when a page step breaks.
Related issues
- SEO-210Product schema missing on product pagesFix guide
- SEO-211Offer price in schema doesn't match the visible priceFix guide
- SEO-213priceCurrency missing or wrongFix guide
- SEO-225Duplicate conflicting schema from theme and pluginFix guide
- SEO-228Merchant listing errors (shipping, return policy missing)Fix guide
- SEO-224Required properties missing (name, image) causing errors in Search ConsoleFix guide