Ecommerce Shopify WordPress Discussion

Error When Publishing A Product To Online Store in Shopify

After creating a product I'm trying to publish it to the online store. The product is getting published but I'm getting the following error: Error: Your app doesn't have a publication for this shop. Here is my code: // Publish the newly created product. const publishProductRequest = await admin.graphql( `#graphql mutation publishProduct($id: ID!, $input: [PublicationInput!]!) { publishablePublish(id: $id, input: $input) { userErrors { field message } publishable { availablePublicationCount publicationCount publishedOnCurrentPublication } shop { id name publicationCount } } }`, { variables: { id: productId, input: { publicationId: onlineStorePublicationId, }, }, } ); const publishProductResponse = await publishProductRequest.json(); return json(publishProductResponse); However I found a similar question in the Shopify discussion with an accepted solution which is: The app needed storefront API access to set the product to Online Store. But I couldn't comprehend the solution. Can anyone please help with the issue? TIA
Our products

The help you need, when you need it

App by Turbo Engine

3 apps • 5.0 average rating

Turbosify Speed Booster

5.0 (7)
Get better conversions by optimizing shopify store Google page speed Installed

Turbosify Translator for Wordpress Woocommerce

5.0 (74) Free Wordpress Woocommerce Plugin
Translate your wordpress website to multiple language within 1 click, no configuration needed, no No technical required

Grow your business here

Whether you want to sell products down the street or around the world, we have all the tools you need.