I have created a Shopify app which will allow different store owners to download it and to configure different Web-hooks of their choice like “Order Create”, “Order Update” etc…
Each and every Web-hooks are getting configured properly and working fine.
But my issue is “how to know that call to web-hook method is made due to action performed by which of the store”
In sort I wanted to know action performed on which store has triggered web-hook method to be executed.
2
Answers
It’s part of the headers and handshake sent by Shopify to your app.
Regardless of the type of webhook you get a header X-Shopify-Shop-Domain that contains the permanent-shop.myshopify.com address of the shop. see
Shopify package has a method that allow you to register a handler for each topic
The handler arguments have the shop that is called for that webhook
Here’s an example for product delete handler