Best practice for webhook management #235
Unanswered
matthewhaworth
asked this question in
Q&A
Replies: 1 comment 1 reply
-
class SyncWebhooksAction
{
public function execute(User $shop): void
{
$shopId = ShopId::fromNative($shop->id);
$webhooks = config('shopify-app.webhooks');
WebhookInstaller::dispatch($shopId, $webhooks);
}
} |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello! I'm new to this world so excuse my naivety.
I can see that by default you set your webhooks up with Shopify when a store installs your app; that is how this module works here. However, how might I handle adding webhooks to shops after they have installed the app later down the line? Say for example initially I only require a webhook when an order is created, and I release my app. Later down the line I add a feature that requires me to observe refunds also. What's the best practice approach to doing that?
Beta Was this translation helpful? Give feedback.
All reactions