Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Add comments to deprecate the event
Maciej Korycinski8ba1c9759f37
diff --git a/saleor/core/permissions.py b/saleor/core/permissions.pyindex e33099a847..9cb29055f7 100644--- a/saleor/core/permissions.py+++ b/saleor/core/permissions.py@@ -35,6 +35,7 @@ class MenuPermissions(BasePermissionEnum):MANAGE_MENUS = "menu.manage_menus"+# Depreacted. It will be removed in Saleor 3.0class CheckoutPermissions(BasePermissionEnum):MANAGE_CHECKOUTS = "checkout.manage_checkouts"diff --git a/saleor/graphql/webhook/mutations.py b/saleor/graphql/webhook/mutations.pyindex 51df00fe64..b24a72aefa 100644--- a/saleor/graphql/webhook/mutations.py+++ b/saleor/graphql/webhook/mutations.py@@ -13,7 +13,11 @@ class WebhookCreateInput(graphene.InputObjectType):name = graphene.String(description="The name of the webhook.", required=False)target_url = graphene.String(description="The url to receive the payload.")events = graphene.List(- WebhookEventTypeEnum, description="The events that webhook wants to subscribe."+ WebhookEventTypeEnum,+ description=(+ "The events that webhook wants to subscribe. The CHECKOUT_QUANTITY_CHANGED"+ " is depreacted. It will be removed in Saleor 3.0"+ ),)service_account = graphene.ID(required=False,@@ -103,7 +107,10 @@ class WebhookUpdateInput(graphene.InputObjectType):)events = graphene.List(WebhookEventTypeEnum,- description="The events that webhook wants to subscribe.",+ description=(+ "The events that webhook wants to subscribe. The CHECKOUT_QUANTITY_CHANGED"+ " is depreacted. It will be removed in Saleor 3.0"+ ),required=False,)service_account = graphene.ID(diff --git a/saleor/webhook/event_types.py b/saleor/webhook/event_types.pyindex 33ada9faf7..6fb271d4e8 100644--- a/saleor/webhook/event_types.py+++ b/saleor/webhook/event_types.py@@ -20,6 +20,7 @@ class WebhookEventType:PRODUCT_CREATED = "product_created"+ # This event is deprecated. It will be removed in Saleor 3.0CHECKOUT_QUANTITY_CHANGED = "checkout_quantity_changed"DISPLAY_LABELS = {@@ -31,6 +32,7 @@ class WebhookEventType:ORDER_FULFILLED: "Order fulfilled",CUSTOMER_CREATED: "Customer created",PRODUCT_CREATED: "Product created",+ # CHECKOUT_QUANTITY_CHANGED is deprecated. It will be removed in Saleor 3.0CHECKOUT_QUANTITY_CHANGED: "Checkout quantity changed",FULFILLMENT_CREATED: "Fulfillment_created",}@@ -44,6 +46,7 @@ class WebhookEventType:(ORDER_FULFILLED, DISPLAY_LABELS[ORDER_FULFILLED]),(CUSTOMER_CREATED, DISPLAY_LABELS[CUSTOMER_CREATED]),(PRODUCT_CREATED, DISPLAY_LABELS[PRODUCT_CREATED]),+ # CHECKOUT_QUANTITY_CHANGED is deprecated. It will be removed in Saleor 3.0(CHECKOUT_QUANTITY_CHANGED, DISPLAY_LABELS[CHECKOUT_QUANTITY_CHANGED]),(FULFILLMENT_CREATED, DISPLAY_LABELS[FULFILLMENT_CREATED]),]