Published, but the store doesn't show it
Published and in stock, yet missing from the shop page, categories and search. On WooCommerce 11.1 and 11.2 a simple product can't even be bought.
The symptom
A category says it holds 16 products and shows 2. The missing ones look fine in the admin: published, visibility “Shop and search results”, in stock. They are not on the shop page, not in the category and not in search results — yet open one by its direct link and the page is there, with the price.
On WooCommerce 11.1 and 11.2 that page has no Add to cart button: a simple product in this state cannot be bought at all, not even by a customer arriving from a link or an ad.
The cause is a field the admin never shows: the product’s parent (post_parent). WordPress uses
it for pages and attachments, WooCommerce for variations. A simple product does not use it at all,
but it can still carry one: CSV import writes it from the “Parent” column, and the REST API
accepts any parent_id when a product is created, without checking that such an entry exists —
which is how Zapier and similar integrations create products. When that parent does not exist or
is not published, WooCommerce hides the product.
What it costs
- Products nobody can find. Shoppers browse categories and search. A product missing from both sells only to someone who already has its link.
- On WooCommerce 11.1 and 11.2, not even to them. A simple product hidden this way cannot be added to the cart, so traffic you paid for — an ad, a newsletter — lands on a price with no button.
- Nothing in the admin points at it. The product is published, visible and in stock. Editing it changes nothing, because saving the product writes the same parent back. The only trace is a category count that does not match the list.
How much of this hits your store depends on the WooCommerce version. Version 11.1 started requiring the parent to be published, even when the parent ID points at an entry that does not exist. The fix is merged for 11.3: from that version only a parent that is a product or a variation counts.
| WooCommerce | The parent does not exist, or is not a product | The parent is an unpublished product |
|---|---|---|
| up to 11.0 | no effect | hidden from lists, can be bought from its address |
| 11.1 and 11.2 | hidden from lists, cannot be bought | hidden from lists, cannot be bought |
| from 11.3 | no effect | hidden from lists, cannot be bought |
“Cannot be bought” is about simple products. A variable product hidden this way still sold its variations from its own page in our tests.
How to check it yourself
Without database access, through the store’s public Store API. Open this address, with your store’s domain:
https://example.com/wp-json/wc/store/v1/products?per_page=100
Add &category=ID to see a single category, &page=2 for the next hundred. On WooCommerce 11.1 the
list still includes the products the shop page leaves out, and each has a "parent" field. A simple
product should have "parent": 0 — any other number on a product missing from the category is this
problem.
From the database, the query below lists published products whose parent does not exist or is not published:
wp db query "SELECT p.ID, p.post_title, p.post_parent,
r.post_type AS parent_type, r.post_status AS parent_status
FROM wp_posts p
LEFT JOIN wp_posts r ON r.ID = p.post_parent
WHERE p.post_type = 'product' AND p.post_status = 'publish'
AND p.post_parent <> 0
AND (r.ID IS NULL OR r.post_status <> 'publish')"
NULL in parent_type means the parent does not exist. Read the result against the table above:
on WooCommerce 11.0 and earlier, and from 11.3, a parent that does not exist or is not a product
hides nothing, so on those versions such a row is not a problem. Variations are not listed — for
them a parent is normal.
From the admin, compare the count in Products → Categories with the number of products the category page shows, then open a missing product by its address. On 11.1 and 11.2 a simple product shows its price without the Add to cart button.
How to fix it
-
Remove the parent: the product needs
post_parentset to 0. The product editor has no such field, and saving the product writes the same parent back. -
One product at a time, with WP-CLI:
wp post update ID --post_parent=0, where ID is the product number. -
Many products at once: back up the database first, then run this query in phpMyAdmin or your host’s database tool. It clears the parent of every product whose parent does not exist or is not published; if your tables do not start with
wp_, change the prefix.UPDATE wp_posts p LEFT JOIN wp_posts r ON r.ID = p.post_parent SET p.post_parent = 0 WHERE p.post_type = 'product' AND p.post_parent <> 0 AND (r.ID IS NULL OR r.post_status <> 'publish'); -
If the parent is one of your products that is only unpublished, publishing it brings the hidden products back too — check first that it belongs in the store.
-
Then find what wrote the parent: a CSV import with the “Parent” column filled in, or a tool that creates products through the REST API (Zapier, an integration) and sends
parent_id. Otherwise the next import brings the problem back.
A parent that does not exist stops hiding products from WooCommerce 11.3 on. Do not wait for it: until you update, these products do not sell, and a parent that is an unpublished product keeps hiding them in every version.
When it is a false positive
Practically never. WooCommerce hides the product from customers whatever you meant. If you do not want it in the store anyway, set it to draft, so it is not counted as published.
What keeps this check quiet where it should be quiet: a parent that does nothing in your version of WooCommerce is not a finding. Up to 11.0 a missing parent hides nothing, and from 11.3 neither does a parent that is not a product — the query above lists such products, Merchlint does not. Variations are skipped, because for them a parent is normal.
How Merchlint finds it
Merchlint takes every published product that has a parent — one query across the whole catalog, with the parent joined — and lets WooCommerce decide. From version 11.1 it asks WooCommerce whether the product is publicly viewable, the check WooCommerce uses for product lists and the cart, without your admin rights — so the answer is what a customer gets, even though the audit runs from an administrator’s account. From 11.3 that check ignores a parent that is not a product, and the rule follows it. Before 11.1 Merchlint applies the rule of those versions: the product is hidden only when its parent is a product or a variation that is not published.
The finding shows the parent ID, what is wrong with the parent — it does not exist, or it is not published — and, when the parent exists, its type and publication status in the words WordPress uses. Last comes what customers get: hidden from the shop page, categories and search, plus “can’t be bought” for a simple product on WooCommerce 11.1 and later.
Confidence: F — fact from the database, with the verdict made by WooCommerce itself.
New in version 0.3.7. Status and catalog visibility, which Selling, but hidden from the catalog reads, are both fine on these products — that check does not see them.
This check runs in the free version, on every product, with no cap.
Doesn't match what you see in your store? Email us — we read every message. contact@merchlint.com