-
Notifications
You must be signed in to change notification settings - Fork 477
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
Support for bulk update of metafields? #419
Comments
Not working for me either... |
I've got a product like this:
|
@wakproductions Does this still happen if you fix the typo you have for |
Fixing the typo and using the 2.4.1 :010 > shopify_shop.metafields = [
ShopifyAPI::Metafield.new({ namespace: 'my-app', value: 'hi', key: 'hello', value_type: 'string'})
]
=> [#<ShopifyAPI::Metafield:0x007fd91a3b9bb0 @attributes={...}, @prefix_options={}, @persisted=false>]
2.4.1 :011 > shopify_shop.save
ActiveResource::ClientError: Failed. Response code = 406. Response message = Not Acceptable.
from (irb):11 |
@travishaynes I made the correction you suggested and it now seems to work. Thanks! @jagthedrummer I don't think you need to enclose it in a |
You can also bulk add metafields this way:
Updating / overriding does not work this way, though. |
This issue is stale because it has been open for 90 days with no activity. It will be closed if no further action occurs in 14 days. |
We are closing this issue because it has been inactive for a few months. If you still encounter this issue with the latest stable version, please reopen using the issue template. You can also contribute directly by submitting a pull request– see the CONTRIBUTING.md file for guidelines Thank you! |
The main API docs indicate that it's possible to set multiple metafields on a product with a single API call by including them as part of a product update. Is there anyway to do this through the ruby API?
https://help.shopify.com/api/reference/product#update
The text was updated successfully, but these errors were encountered: