Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Fix descriptions

fowczrekdaf855e8c502
diff --git a/saleor/graphql/product/types/products.py b/saleor/graphql/product/types/products.py
index 80ca260e60..b2f5b22b11 100644
--- a/saleor/graphql/product/types/products.py
+++ b/saleor/graphql/product/types/products.py
@@ -252,7 +252,13 @@ class ProductVariant(CountableDjangoObjectType):
required=True,
description="Quantity of a product available for sale in one checkout.",
country_code=graphene.Argument(
- CountryCodeEnum, description="Two-letter ISO 3166-1 country code.",
+ CountryCodeEnum,
+ description=(
+ "Two-letter ISO 3166-1 country code. When provided, the exact quantity "
+ "from a warehouse operating in shipping zones that contain this "
+ "country will be returned. Otherwise, it will return the maximum "
+ "quantity from all shipping zones."
+ ),
),
)
diff --git a/saleor/warehouse/availability.py b/saleor/warehouse/availability.py
index 1c5bff3189..4c7ea92499 100644
--- a/saleor/warehouse/availability.py
+++ b/saleor/warehouse/availability.py
@@ -56,7 +56,12 @@ def get_available_quantity_for_customer(
"""Return maximum checkout line quantity.
Returns maximum checkout quantity for the given variant and country code.
- If country code is missing return maximum checkout quantity from shipping zones.
+ If country code is provided, the function returns the exact variant quantity
+ available in warehouses operating in shipping zones containing this country.
+ Otherwise, it returns the maximum quantity from all shipping zones.
+
+ The returned value is limited by `MAX_CHECKOUT_LINE_QUANTITY` setting to
+ limit the quantity of a variant that can be added in one checkout line.
"""
query = Q(product_variant=variant)
if country_code: