Skip to content

Save many metafields with a single requestΒ #112

@flux627

Description

@flux627

There does not seem to be a way to attach metafields locally, and then simply save the product with the metafields along with it. I'm forced to use add_metafields() or Metafield().save(), both of which adds a single metafield per API call. This is very slow.

If I take a product with 50 metafields, and save it as a new product, it saves almost instantly, like so:

p = shopify.Product.find()[0]
print len(p.metafields())
> 50
p.id = None
p.images = None
p.save()

How can I attach metafields to a product in the same way they are attached when they are fetched?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions