Skip to content

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

Remove deprecated shopFetchTaxRates mutation (#19581)

Lukasz Ostrowski61eff9bd0730
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1cebcfa14b..9d6fb9dce8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -19,6 +19,7 @@ All notable, unreleased changes to this project will be documented in this file.
- Removed the deprecated `checkoutId` input argument from the `checkoutShippingAddressUpdate` and `checkoutBillingAddressUpdate` mutations. Use the `id` argument instead.
- `confirmAccount()` mutation no longer allows to confirm an account that was already confirmed. - #19459 by @NyanKiyosi
- Removed the deprecated `shopDomainUpdate` mutation. Use the `PUBLIC_URL` environment variable to configure the shop domain instead.
+- Removed the deprecated `shopFetchTaxRates` mutation, along with the `ShopFetchTaxRates` type. It was a no-op; configure taxes with the tax mutations (e.g. `taxConfigurationUpdate`) instead.
- Removed the deprecated `orderSettingsUpdate` mutation. Use the `channelUpdate` mutation with the `orderSettings` input to update order settings per channel instead.
- Removed the deprecated `orderSettings` query field. Use the `channel` query and read its `orderSettings` field instead.
- Removed the deprecated `orderAddNote` mutation, along with the `OrderAddNote` type and `OrderAddNoteInput` input. Use the `orderNoteAdd` mutation instead.
diff --git a/saleor/graphql/schema.graphql b/saleor/graphql/schema.graphql
index a799b0320f..16d08bc859 100644
--- a/saleor/graphql/schema.graphql
+++ b/saleor/graphql/schema.graphql
@@ -17780,13 +17780,6 @@ type Mutation {
input: ShopSettingsInput!
): ShopSettingsUpdate @doc(category: "Shop") @webhookEventsInfo(asyncEvents: [SHOP_METADATA_UPDATED], syncEvents: [])
- """
- Fetch tax rates.
-
- Requires one of the following permissions: MANAGE_SETTINGS.
- """
- shopFetchTaxRates: ShopFetchTaxRates @doc(category: "Shop") @deprecated
-
"""
Creates/updates translations for shop settings.
@@ -23286,18 +23279,6 @@ input ShopSettingsInput {
accountConfirmMergeMode: AccountConfirmModeEnum
}
-"""
-Fetch tax rates.
-
-Requires one of the following permissions: MANAGE_SETTINGS.
-"""
-type ShopFetchTaxRates @doc(category: "Shop") {
- """Updated shop."""
- shop: Shop
- shopErrors: [ShopError!]! @deprecated(reason: "Use `errors` field instead.")
- errors: [ShopError!]!
-}
-
"""
Creates/updates translations for shop settings.
diff --git a/saleor/graphql/shop/mutations/__init__.py b/saleor/graphql/shop/mutations/__init__.py
index ec0e1b9f0d..0678424fca 100644
--- a/saleor/graphql/shop/mutations/__init__.py
+++ b/saleor/graphql/shop/mutations/__init__.py
@@ -4,7 +4,6 @@ from .refund_settings_update import RefundSettingsUpdate
from .return_reason_reference_type_clear import ReturnReasonReferenceTypeClear
from .return_settings_update import ReturnSettingsUpdate
from .shop_address_update import ShopAddressUpdate
-from .shop_fetch_tax_rates import ShopFetchTaxRates
from .shop_settings_update import ShopSettingsUpdate
from .staff_notification_recipient_create import StaffNotificationRecipientCreate
from .staff_notification_recipient_delete import StaffNotificationRecipientDelete
@@ -17,7 +16,6 @@ __all__ = [
"ReturnSettingsUpdate",
"ReturnReasonReferenceTypeClear",
"ShopAddressUpdate",
- "ShopFetchTaxRates",
"ShopSettingsUpdate",
"StaffNotificationRecipientCreate",
"StaffNotificationRecipientDelete",
diff --git a/saleor/graphql/shop/mutations/shop_fetch_tax_rates.py b/saleor/graphql/shop/mutations/shop_fetch_tax_rates.py
deleted file mode 100644
index 019a159f51..0000000000
--- a/saleor/graphql/shop/mutations/shop_fetch_tax_rates.py
+++ /dev/null
@@ -1,24 +0,0 @@
-import graphene
-
-from ....permission.enums import SitePermissions
-from ...core import ResolveInfo
-from ...core.doc_category import DOC_CATEGORY_SHOP
-from ...core.mutations import BaseMutation
-from ...core.types import ShopError
-from ..types import Shop
-
-
-class ShopFetchTaxRates(BaseMutation):
- shop = graphene.Field(Shop, description="Updated shop.")
-
- class Meta:
- description = "Fetch tax rates."
- doc_category = DOC_CATEGORY_SHOP
- permissions = (SitePermissions.MANAGE_SETTINGS,)
- error_type_class = ShopError
- error_type_field = "shop_errors"
-
- @classmethod
- def perform_mutation(cls, _root, _info: ResolveInfo, /):
- # This mutation is deprecated and will be removed in Saleor 4.0.
- return ShopFetchTaxRates(shop=Shop())
diff --git a/saleor/graphql/shop/schema.py b/saleor/graphql/shop/schema.py
index 3325c6f998..1484096dd9 100644
--- a/saleor/graphql/shop/schema.py
+++ b/saleor/graphql/shop/schema.py
@@ -1,7 +1,6 @@
import graphene
from ...permission.enums import GiftcardPermissions
-from ..core.descriptions import DEFAULT_DEPRECATION_REASON
from ..core.doc_category import (
DOC_CATEGORY_GIFT_CARDS,
DOC_CATEGORY_SHOP,
@@ -16,7 +15,6 @@ from .mutations import (
ReturnReasonReferenceTypeClear,
ReturnSettingsUpdate,
ShopAddressUpdate,
- ShopFetchTaxRates,
ShopSettingsUpdate,
StaffNotificationRecipientCreate,
StaffNotificationRecipientDelete,
@@ -75,9 +73,6 @@ class ShopMutations(graphene.ObjectType):
staff_notification_recipient_delete = StaffNotificationRecipientDelete.Field()
shop_settings_update = ShopSettingsUpdate.Field()
- shop_fetch_tax_rates = ShopFetchTaxRates.Field(
- deprecation_reason=DEFAULT_DEPRECATION_REASON
- )
shop_settings_translate = ShopSettingsTranslate.Field()
shop_address_update = ShopAddressUpdate.Field()