Anchor to shopLocaleDisableshop
shopLocaleDisable
mutation
Requires access scope.
Deletes a locale for a shop. This also deletes all translations of this locale.
Anchor to Arguments
Arguments
- Anchor to localelocale•String!required
ISO code of the locale to delete.
Was this section helpful?
Anchor to ShopLocaleDisablePayload returnsShopLocaleDisablePayload returns
- Anchor to localelocale•
ISO code of the locale that was deleted.
- Anchor to userErrorsuser•
Errors [UserError!]! non-null The list of errors that occurred from executing the mutation.
Was this section helpful?
- Delete the Korean locale from a shop
- shopLocaleDisable reference
Examples
const { admin } = await authenticate.admin(request);
const response = await admin.graphql(
`#graphql
mutation disableLocale($locale: String!) {
shopLocaleDisable(locale: $locale) {
userErrors {
message
field
}
locale
}
}`,
{
variables: {
"locale": "ko"
},
},
);
const data = await response.json();
mutation disableLocale($locale: String!) {
shopLocaleDisable(locale: $locale) {
userErrors {
message
field
}
locale
}
}
curl -X POST \
https://your-development-store.myshopify.com/admin/api/2024-04/graphql.json \
-H 'Content-Type: application/json' \
-H 'X-Shopify-Access-Token: {access_token}' \
-d '{
"query": "mutation disableLocale($locale: String!) { shopLocaleDisable(locale: $locale) { userErrors { message field } locale } }",
"variables": {
"locale": "ko"
}
}'
const { admin } = await authenticate.admin(request);
const response = await admin.graphql(
`#graphql
mutation disableLocale($locale: String!) {
shopLocaleDisable(locale: $locale) {
userErrors {
message
field
}
locale
}
}`,
{
variables: {
"locale": "ko"
},
},
);
const data = await response.json();
const client = new shopify.clients.Graphql({session});
const data = await client.query({
data: {
"query": `mutation disableLocale($locale: String!) {
shopLocaleDisable(locale: $locale) {
userErrors {
message
field
}
locale
}
}`,
"variables": {
"locale": "ko"
},
},
});
session = ShopifyAPI::Auth::Session.new(
shop: "your-development-store.myshopify.com",
access_token: access_token
)
client = ShopifyAPI::Clients::Graphql::Admin.new(
session: session
)
query = <<~QUERY
mutation disableLocale($locale: String!) {
shopLocaleDisable(locale: $locale) {
userErrors {
message
field
}
locale
}
}
QUERY
variables = {
"locale": "ko"
}
response = client.query(query: query, variables: variables)
Input variables
JSON{
"locale": "ko"
}
Response
JSON{
"shopLocaleDisable": {
"userErrors": [],
"locale": "ko"
}
}