We have a content-gating solution that allows stores to control access to exclusive products with memberships, NFTs, tickets, etc. In order for these products to be truly exclusive and hidden from the storefront, we put the products in draft state and remove them from sales channels.
It used to be that these non-active products could still be added to the cart via the AJAX API. This allowed us to build out shopping carts of gated and non-gated items together, multiple gated items, etc.
This appears to no longer work. Only products that are active and available in the storefront channel can be added to the cart via the AJAX API.
My question is: Is this intended behavior? Or is this a bug?
Having the products available in the storefront means they’re only gated by obscurity, anybody who knows the handle can access the product. So we’re effectively forced to only offer a “Buy it Now” option for non-active products (which triggers draft order creation in our system).