You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extend webhook registration to support metafield_namespaces (#1186)
I've added the ability to specify metafield_namespaces in webhook registration to allow these to be received from apps using this API. This is mostly following the patterns already there for fields.
Have updated:
- docs, adding in mention of the new parameter as well as ensuring it's referenced if using `fields` as well
- Updated the base Registration and child classes to have another keyword argument in the initializer
- Extended the tests, there's more complexity now as before it was just a boolean "are fields present" - but happy to adjust as needed.
- Changelog for this PR
shopify_app will also need adjusting to pass through the `metafield_namespaces` parameter but I can create that PR if there's appetite from this one.
If you are storing metafields on an object you are receiving webhooks for, you can specify them on registration to make sure that they are also sent through the `metafieldNamespaces` parameter. Note if you are also using the `fields` parameter you will need to add `metafields` into that as well.
**Note**: The webhooks you register with Shopify are saved in the Shopify platform, but the local `ShopifyAPI::Webhooks::Registry` needs to be reloaded whenever your server restarts.
0 commit comments