From f4abd8a20d4bfc25e89658b6a9474c7f52d1d372 Mon Sep 17 00:00:00 2001 From: ronik-makwana Date: Tue, 1 Sep 2026 14:03:15 +0530 Subject: [PATCH 1/2] Add missing webhook topics from the 2026-07 WebhookSubscriptionTopic enum Shopify\Webhooks\Topics had drifted from the Admin GraphQL WebhookSubscriptionTopic enum: 32 topics valid in API version 2026-07 had no corresponding constant, so apps subscribing to them had to pass raw strings. Each name is taken verbatim from the enum, so every constant's value matches the topic the API validates against. The change is purely additive - no constant is removed, renamed, or revalued - and is therefore backward compatible. Co-Authored-By: Claude Opus 5 (1M context) --- CHANGELOG.md | 1 + src/Webhooks/Topics.php | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b1d4647..f5bdd9ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## Unreleased - [Deprecated] This package is deprecated in favor of [`shopify/shopify-app-php`](https://packagist.org/packages/shopify/shopify-app-php), which supports the latest Shopify platform features. It is now marked abandoned via the Composer `abandoned` flag. It will keep working for existing users, but no new features or security fixes are planned. See the [shopify-app-php README](https://github.com/Shopify/shopify-app-php#readme) to upgrade. +- [Patch] Add missing webhook topics from the 2026-07 `WebhookSubscriptionTopic` enum to `Shopify\Webhooks\Topics` ## v6.1.1 - 2026-03-02 - [#456](https://github.com/Shopify/shopify-api-php/pull/456) [Patch] Update firebase/php-jwt to ^7.0 to address security vulnerability (GHSA-2x45-7fc3-mxwq) diff --git a/src/Webhooks/Topics.php b/src/Webhooks/Topics.php index adc89b83..69da8eaa 100644 --- a/src/Webhooks/Topics.php +++ b/src/Webhooks/Topics.php @@ -13,6 +13,7 @@ final class Topics { public const APP_PURCHASES_ONE_TIME_UPDATE = 'APP_PURCHASES_ONE_TIME_UPDATE'; + public const APP_SCOPES_UPDATE = 'APP_SCOPES_UPDATE'; public const APP_SUBSCRIPTIONS_APPROACHING_CAPPED_AMOUNT = 'APP_SUBSCRIPTIONS_APPROACHING_CAPPED_AMOUNT'; public const APP_SUBSCRIPTIONS_UPDATE = 'APP_SUBSCRIPTIONS_UPDATE'; public const APP_UNINSTALLED = 'APP_UNINSTALLED'; @@ -56,16 +57,21 @@ final class Topics public const CUSTOMERS_ENABLE = 'CUSTOMERS_ENABLE'; public const CUSTOMERS_MARKETING_CONSENT_UPDATE = 'CUSTOMERS_MARKETING_CONSENT_UPDATE'; public const CUSTOMERS_MERGE = 'CUSTOMERS_MERGE'; + public const CUSTOMERS_PURCHASING_SUMMARY = 'CUSTOMERS_PURCHASING_SUMMARY'; public const CUSTOMERS_UPDATE = 'CUSTOMERS_UPDATE'; + public const CUSTOMERS_WHATS_APP_MARKETING_CONSENT_UPDATE = 'CUSTOMERS_WHATS_APP_MARKETING_CONSENT_UPDATE'; public const CUSTOMER_ACCOUNT_SETTINGS_UPDATE = 'CUSTOMER_ACCOUNT_SETTINGS_UPDATE'; public const CUSTOMER_GROUPS_CREATE = 'CUSTOMER_GROUPS_CREATE'; public const CUSTOMER_GROUPS_DELETE = 'CUSTOMER_GROUPS_DELETE'; public const CUSTOMER_GROUPS_UPDATE = 'CUSTOMER_GROUPS_UPDATE'; + public const CUSTOMER_JOINED_SEGMENT = 'CUSTOMER_JOINED_SEGMENT'; + public const CUSTOMER_LEFT_SEGMENT = 'CUSTOMER_LEFT_SEGMENT'; public const CUSTOMER_PAYMENT_METHODS_CREATE = 'CUSTOMER_PAYMENT_METHODS_CREATE'; public const CUSTOMER_PAYMENT_METHODS_REVOKE = 'CUSTOMER_PAYMENT_METHODS_REVOKE'; public const CUSTOMER_PAYMENT_METHODS_UPDATE = 'CUSTOMER_PAYMENT_METHODS_UPDATE'; public const CUSTOMER_TAGS_ADDED = 'CUSTOMER_TAGS_ADDED'; public const CUSTOMER_TAGS_REMOVED = 'CUSTOMER_TAGS_REMOVED'; + public const DELIVERY_PROMISE_SETTINGS_UPDATE = 'DELIVERY_PROMISE_SETTINGS_UPDATE'; public const DISCOUNTS_CREATE = 'DISCOUNTS_CREATE'; public const DISCOUNTS_DELETE = 'DISCOUNTS_DELETE'; public const DISCOUNTS_REDEEMCODE_ADDED = 'DISCOUNTS_REDEEMCODE_ADDED'; @@ -83,6 +89,8 @@ final class Topics public const FULFILLMENTS_UPDATE = 'FULFILLMENTS_UPDATE'; public const FULFILLMENT_EVENTS_CREATE = 'FULFILLMENT_EVENTS_CREATE'; public const FULFILLMENT_EVENTS_DELETE = 'FULFILLMENT_EVENTS_DELETE'; + public const FULFILLMENT_HOLDS_ADDED = 'FULFILLMENT_HOLDS_ADDED'; + public const FULFILLMENT_HOLDS_RELEASED = 'FULFILLMENT_HOLDS_RELEASED'; public const FULFILLMENT_ORDERS_CANCELLATION_REQUEST_ACCEPTED = 'FULFILLMENT_ORDERS_CANCELLATION_REQUEST_ACCEPTED'; public const FULFILLMENT_ORDERS_CANCELLATION_REQUEST_REJECTED = 'FULFILLMENT_ORDERS_CANCELLATION_REQUEST_REJECTED'; public const FULFILLMENT_ORDERS_CANCELLATION_REQUEST_SUBMITTED = @@ -93,14 +101,18 @@ final class Topics public const FULFILLMENT_ORDERS_FULFILLMENT_REQUEST_SUBMITTED = 'FULFILLMENT_ORDERS_FULFILLMENT_REQUEST_SUBMITTED'; public const FULFILLMENT_ORDERS_FULFILLMENT_SERVICE_FAILED_TO_COMPLETE = 'FULFILLMENT_ORDERS_FULFILLMENT_SERVICE_FAILED_TO_COMPLETE'; + public const FULFILLMENT_ORDERS_HOLD_RELEASED = 'FULFILLMENT_ORDERS_HOLD_RELEASED'; public const FULFILLMENT_ORDERS_LINE_ITEMS_PREPARED_FOR_LOCAL_DELIVERY = 'FULFILLMENT_ORDERS_LINE_ITEMS_PREPARED_FOR_LOCAL_DELIVERY'; public const FULFILLMENT_ORDERS_LINE_ITEMS_PREPARED_FOR_PICKUP = 'FULFILLMENT_ORDERS_LINE_ITEMS_PREPARED_FOR_PICKUP'; + public const FULFILLMENT_ORDERS_MANUALLY_REPORTED_PROGRESS_STOPPED = + 'FULFILLMENT_ORDERS_MANUALLY_REPORTED_PROGRESS_STOPPED'; public const FULFILLMENT_ORDERS_MERGED = 'FULFILLMENT_ORDERS_MERGED'; public const FULFILLMENT_ORDERS_MOVED = 'FULFILLMENT_ORDERS_MOVED'; public const FULFILLMENT_ORDERS_ORDER_ROUTING_COMPLETE = 'FULFILLMENT_ORDERS_ORDER_ROUTING_COMPLETE'; public const FULFILLMENT_ORDERS_PLACED_ON_HOLD = 'FULFILLMENT_ORDERS_PLACED_ON_HOLD'; + public const FULFILLMENT_ORDERS_PROGRESS_REPORTED = 'FULFILLMENT_ORDERS_PROGRESS_REPORTED'; public const FULFILLMENT_ORDERS_RESCHEDULED = 'FULFILLMENT_ORDERS_RESCHEDULED'; public const FULFILLMENT_ORDERS_SCHEDULED_FULFILLMENT_ORDER_READY = 'FULFILLMENT_ORDERS_SCHEDULED_FULFILLMENT_ORDER_READY'; @@ -111,16 +123,36 @@ final class Topics public const INVENTORY_LEVELS_CONNECT = 'INVENTORY_LEVELS_CONNECT'; public const INVENTORY_LEVELS_DISCONNECT = 'INVENTORY_LEVELS_DISCONNECT'; public const INVENTORY_LEVELS_UPDATE = 'INVENTORY_LEVELS_UPDATE'; + public const INVENTORY_SHIPMENTS_ADD_ITEMS = 'INVENTORY_SHIPMENTS_ADD_ITEMS'; + public const INVENTORY_SHIPMENTS_CREATE = 'INVENTORY_SHIPMENTS_CREATE'; + public const INVENTORY_SHIPMENTS_DELETE = 'INVENTORY_SHIPMENTS_DELETE'; + public const INVENTORY_SHIPMENTS_MARK_IN_TRANSIT = 'INVENTORY_SHIPMENTS_MARK_IN_TRANSIT'; + public const INVENTORY_SHIPMENTS_RECEIVE_ITEMS = 'INVENTORY_SHIPMENTS_RECEIVE_ITEMS'; + public const INVENTORY_SHIPMENTS_REMOVE_ITEMS = 'INVENTORY_SHIPMENTS_REMOVE_ITEMS'; + public const INVENTORY_SHIPMENTS_UPDATE_ITEM_QUANTITIES = 'INVENTORY_SHIPMENTS_UPDATE_ITEM_QUANTITIES'; + public const INVENTORY_SHIPMENTS_UPDATE_TRACKING = 'INVENTORY_SHIPMENTS_UPDATE_TRACKING'; + public const INVENTORY_TRANSFERS_ADD_ITEMS = 'INVENTORY_TRANSFERS_ADD_ITEMS'; + public const INVENTORY_TRANSFERS_CANCEL = 'INVENTORY_TRANSFERS_CANCEL'; + public const INVENTORY_TRANSFERS_COMPLETE = 'INVENTORY_TRANSFERS_COMPLETE'; + public const INVENTORY_TRANSFERS_READY_TO_SHIP = 'INVENTORY_TRANSFERS_READY_TO_SHIP'; + public const INVENTORY_TRANSFERS_REMOVE_ITEMS = 'INVENTORY_TRANSFERS_REMOVE_ITEMS'; + public const INVENTORY_TRANSFERS_UPDATED = 'INVENTORY_TRANSFERS_UPDATED'; + public const INVENTORY_TRANSFERS_UPDATE_ITEM_QUANTITIES = 'INVENTORY_TRANSFERS_UPDATE_ITEM_QUANTITIES'; public const LOCALES_CREATE = 'LOCALES_CREATE'; + public const LOCALES_DESTROY = 'LOCALES_DESTROY'; public const LOCALES_UPDATE = 'LOCALES_UPDATE'; public const LOCATIONS_ACTIVATE = 'LOCATIONS_ACTIVATE'; public const LOCATIONS_CREATE = 'LOCATIONS_CREATE'; public const LOCATIONS_DEACTIVATE = 'LOCATIONS_DEACTIVATE'; public const LOCATIONS_DELETE = 'LOCATIONS_DELETE'; public const LOCATIONS_UPDATE = 'LOCATIONS_UPDATE'; + public const MARKETS_BACKUP_REGION_UPDATE = 'MARKETS_BACKUP_REGION_UPDATE'; public const MARKETS_CREATE = 'MARKETS_CREATE'; public const MARKETS_DELETE = 'MARKETS_DELETE'; public const MARKETS_UPDATE = 'MARKETS_UPDATE'; + public const METAFIELD_DEFINITIONS_CREATE = 'METAFIELD_DEFINITIONS_CREATE'; + public const METAFIELD_DEFINITIONS_DELETE = 'METAFIELD_DEFINITIONS_DELETE'; + public const METAFIELD_DEFINITIONS_UPDATE = 'METAFIELD_DEFINITIONS_UPDATE'; public const METAOBJECTS_CREATE = 'METAOBJECTS_CREATE'; public const METAOBJECTS_DELETE = 'METAOBJECTS_DELETE'; public const METAOBJECTS_UPDATE = 'METAOBJECTS_UPDATE'; @@ -129,6 +161,7 @@ final class Topics public const ORDERS_DELETE = 'ORDERS_DELETE'; public const ORDERS_EDITED = 'ORDERS_EDITED'; public const ORDERS_FULFILLED = 'ORDERS_FULFILLED'; + public const ORDERS_LINK_REQUESTED = 'ORDERS_LINK_REQUESTED'; public const ORDERS_PAID = 'ORDERS_PAID'; public const ORDERS_PARTIALLY_FULFILLED = 'ORDERS_PARTIALLY_FULFILLED'; public const ORDERS_RISK_ASSESSMENT_CHANGED = 'ORDERS_RISK_ASSESSMENT_CHANGED'; From 1eb78ae4eccce8742a9aeb1ac739495e64026c3d Mon Sep 17 00:00:00 2001 From: ronik-makwana Date: Tue, 1 Sep 2026 14:19:01 +0530 Subject: [PATCH 2/2] Add remaining 2026-01 webhook topics missed in the previous pass Six topics valid in API version 2026-01 (and still present in 2026-07) had no constant in Shopify\Webhooks\Topics: the five FINANCE_* topics and RETURNS_PROCESS, which has been in the enum since at least 2025-10. Names are taken verbatim from the WebhookSubscriptionTopic enum, so each constant's value matches the topic the API validates against. Verified by diffing the class against the published enum for 2025-10, 2026-01 and 2026-07 - no value in any of those versions is now missing. The CHANGELOG entry is reworded to cover both versions. The change is purely additive and therefore backward compatible. Co-Authored-By: Claude Opus 5 (1M context) --- CHANGELOG.md | 2 +- src/Webhooks/Topics.php | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f5bdd9ba..13bf5073 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## Unreleased - [Deprecated] This package is deprecated in favor of [`shopify/shopify-app-php`](https://packagist.org/packages/shopify/shopify-app-php), which supports the latest Shopify platform features. It is now marked abandoned via the Composer `abandoned` flag. It will keep working for existing users, but no new features or security fixes are planned. See the [shopify-app-php README](https://github.com/Shopify/shopify-app-php#readme) to upgrade. -- [Patch] Add missing webhook topics from the 2026-07 `WebhookSubscriptionTopic` enum to `Shopify\Webhooks\Topics` +- [Patch] Add missing webhook topics from the 2026-01 and 2026-07 `WebhookSubscriptionTopic` enums to `Shopify\Webhooks\Topics` ## v6.1.1 - 2026-03-02 - [#456](https://github.com/Shopify/shopify-api-php/pull/456) [Patch] Update firebase/php-jwt to ^7.0 to address security vulnerability (GHSA-2x45-7fc3-mxwq) diff --git a/src/Webhooks/Topics.php b/src/Webhooks/Topics.php index 69da8eaa..3e445b47 100644 --- a/src/Webhooks/Topics.php +++ b/src/Webhooks/Topics.php @@ -85,6 +85,11 @@ final class Topics public const DRAFT_ORDERS_CREATE = 'DRAFT_ORDERS_CREATE'; public const DRAFT_ORDERS_DELETE = 'DRAFT_ORDERS_DELETE'; public const DRAFT_ORDERS_UPDATE = 'DRAFT_ORDERS_UPDATE'; + public const FINANCE_APP_STAFF_MEMBER_DELETE = 'FINANCE_APP_STAFF_MEMBER_DELETE'; + public const FINANCE_APP_STAFF_MEMBER_GRANT = 'FINANCE_APP_STAFF_MEMBER_GRANT'; + public const FINANCE_APP_STAFF_MEMBER_REVOKE = 'FINANCE_APP_STAFF_MEMBER_REVOKE'; + public const FINANCE_APP_STAFF_MEMBER_UPDATE = 'FINANCE_APP_STAFF_MEMBER_UPDATE'; + public const FINANCE_KYC_INFORMATION_UPDATE = 'FINANCE_KYC_INFORMATION_UPDATE'; public const FULFILLMENTS_CREATE = 'FULFILLMENTS_CREATE'; public const FULFILLMENTS_UPDATE = 'FULFILLMENTS_UPDATE'; public const FULFILLMENT_EVENTS_CREATE = 'FULFILLMENT_EVENTS_CREATE'; @@ -195,6 +200,7 @@ final class Topics public const RETURNS_CANCEL = 'RETURNS_CANCEL'; public const RETURNS_CLOSE = 'RETURNS_CLOSE'; public const RETURNS_DECLINE = 'RETURNS_DECLINE'; + public const RETURNS_PROCESS = 'RETURNS_PROCESS'; public const RETURNS_REOPEN = 'RETURNS_REOPEN'; public const RETURNS_REQUEST = 'RETURNS_REQUEST'; public const RETURNS_UPDATE = 'RETURNS_UPDATE';