Shopify / shopify-app-template-remix

371 stars 149 forks source link

More consistent webhooks #853

Closed byrichardpowell closed 2 months ago

byrichardpowell commented 2 months ago

WHY are these changes introduced?

The implementation for each webhook was a little inconsistent, which may have been confuding.

WHAT is this pull request doing?

  1. Always log the shop when logging inside a webhook handler
  2. Always log use the payload (except for app uninstalled). I didn't log the payload for this topic because it may fired when you run npm run dev and I didn't want the console to be too noisy.
  3. Remove the shop check for shop redact since it was guarding agaisnt something that will be true (oops)

Test this PR

shopify app init --template=https://github.com/Shopify/shopify-app-template-remix#<your-branch-name>

Checklist