App reviews, troubleshooting, and recommendations
Hello, 👋
Is there another way to update the selling plan for product variants?
When merchants update a product, I want to update the selling plan for product variants based on X conditions. What I'm doing is removing all product variants from https://shopify.dev/docs/api/admin-graphql/2024-10/mutations/sellingPlanGroupRemoveProductVariants and then adding the appropriate ones with https://shopify.dev/docs/api/admin-graphql/2024-10/mutations/sellingPlanGroupAddProductVariants. This works perfectly when using the app, but when the webhook is triggered, the add mutation fails and returns an error:
{ field: [ 'productVariantIds' ], message: 'Resource has already been taken' }
As I mentioned, it works fine in the app, without errors, but not on the webhook. Why is that? Is it due to Shopify's cache?
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025