With variant-level publishing in Admin API 2026-07, how should an app efficiently determine whether a specific variant is published on the Online Store?
ProductVariant.publishedOnPublication requires the shop-specific Online Store publication ID. Apps must therefore discover that ID and repeatedly query it or cache it per shop.
product.publishedAt is insufficient because the product can be published while the variant is not. availableForSale also isn’t equivalent to publication state.
Could Shopify add ProductVariant.publishedOnOnlineStore or variant-level publishedInContext? Requiring every app to manage opaque publication IDs seems excessive for such a basic visibility check.
Hey @Angelina_Prokopeva - I had a look into this for you!
In 2026-07 the ProductVariant picks up the Publishable interface, and there’s no dedicated publishedOnOnlineStore or variant-level publishedInContext field, so you’re correct that publishedOnPublication(publicationId:) is the supported per-variant check. You’re also right that product.publishedAt and availableForSale answer different questions, the latter being “can a buyer purchase this on the storefront” rather than “is it published to this channel”.
Playing around on my test store, the publication ID part was less painful than it looks because that ID is stable per shop. The one gotcha is matching, since publication.name is deprecated and catalog.title comes back as an auto-generated string like “Channel Catalog … for Online Store”. Match on the channel handle online_store instead, which is stable and not localized:
query {
publications(first: 50, catalogType: APP) {
edges { node { id channels(first: 1) { nodes { handle name } } } }
}
}
If you’d rather skip the cached ID entirely, resourcePublicationsV2 on the variant gives you the full set of channels in one call, and you can pick out the Online Store entry by that same handle. The variant-level publishing guide covers the 2026-07 behavior and recommends reading variant publication state through that field.
A first-class variant-level “published on Online Store” field is absolutely reasonable feedback, so I’ve passed it along to the relevant team internally as a feature request - thanks for raising this here!