Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mandatory Webhooks not being created #1702

Closed
flavio-b opened this issue Jun 26, 2023 · 2 comments
Closed

Mandatory Webhooks not being created #1702

flavio-b opened this issue Jun 26, 2023 · 2 comments

Comments

@flavio-b
Copy link
Contributor

flavio-b commented Jun 26, 2023

Issue summary

My shopify_app.rb initializer is configured exactly like the default template, including this:

config.webhooks = [
    { topic: "app/uninstalled", address: "webhooks/app_uninstalled"},
    { topic: "customers/data_request", address: "webhooks/customers_data_request" },
    { topic: "customer/redact", address: "webhooks/customers_redact"},
    { topic: "shop/redact", address: "webhooks/shop_redact"}
  ]

It has the jobs to match each Webhook, also exactly like the default template.

I reset my database and did a fresh install of the app. When I check which Webhooks have been created with ShopifyAPI::Webhook.all, it only returns the "app/uninstalled" one. Is this the expected behaviour?

  • shopify_api version: 13.0.0
  • shopify_app version: 21.5.0
  • Ruby version: 2.7.8
  • Operating system: macOS
  • API 2022-10

Expected behavior

I would expected all the Webhooks to show when I call ShopifyAPI::Webhook.all

Actual behavior

Only returns the Webhook with topic app/uninstalled

Steps to reproduce the problem

  1. Do a fresh install using ShopifyApp 21.5.0
  2. With an active session, call ShopifyAPI::Webhook.all
@flavio-b
Copy link
Contributor Author

flavio-b commented Jul 2, 2023

I also noticed that one of the webhook topics has a typo in it, which comes from one of the generators. It should be "customers/redact" instead of "customer/redact". #1704 fixes the template.

@flavio-b
Copy link
Contributor Author

Based on this documentation, developers don't need to create subscription to the mandatory Webhooks. These are configured in the Partner Dashboard, so I guess it explains why they don't show when we call ShopifyAPI::Webhook.all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant