Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any attempt to create or update variants fails with error #192

Open
leighstillard opened this issue Nov 8, 2022 · 0 comments
Open

Any attempt to create or update variants fails with error #192

leighstillard opened this issue Nov 8, 2022 · 0 comments
Labels
help wanted Extra attention is needed

Comments

@leighstillard
Copy link

Hi there,

I'm consistently getting the following error whenever I attempt to create or change a variant using this library:

Write requests to inventory_quantity and inventory_quantity_adjustment are no longer supported. Please use the Inventory Levels API.

For reference, here is a snippet of code where I'm attempting the change:

	ok := YesNoPrompt("Update Shopify Price?", true)
		if ok {
			fmt.Println("Updating Shopify Price")
			currentVariant, err := client.Variant.Get(foundVariantID, nil)
			assertNoErr(err)
			// update price of local variant
			currentVariant.Price = &shopifyPrice
			// update remote variant
			newVar, err := client.Variant.Create(foundProductID, *currentVariant)
			assertNoErr(err)

			fmt.Printf("New variant price is: %v\n", newVar.Price.String())
			// verify update
		}```
@oliver006 oliver006 added the help wanted Extra attention is needed label Mar 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants