Upgrading
Upgrading from 5.x to 6.x
This release contains a number of breaking changes to the integration code and data. After updating you should re-sync all products to ensure the data is in the most up to date format.
We have removed support for connections to the deprecated REST API, replacing all calls with GraphQL. If you were using the REST API in your own code it will no longer work. We now target api version 2025-04
by default.
If you were using the {{ shopify:address_form }}
tag, any form fields names should now be camelCase, not snake_case, in line with what Shopify's GraphQL mutations expect: https://shopify.dev/docs/api/storefront/2024-10/input-objects/MailingAddressInput
storefront_id
is no longer available on variants, please use variant_id
instead.
inventory_management
is no longer taken into consideration for stock levels as it is not returned by GraphQL.
grams
is no longer available on variants, instead use weight
which contains unit
and value
subfields.
ImportCollectionJob
and ImportSingleProductJob
no longer accept arrays, instead they accept the unique ID of the product you want to update.
ImportAllProductsJob
has been removed entirely.
Upgrading from 4.x to 5.x
Due to the essential migration to the Shopify Storefront Checkout API, any previous Javascript integrations that relied on the supplied Javascript files will no longer continue to work. Code updates will be required. We strongly recommend taking this opportunity to move to the newly provided Alpine.js integration (See the Storefront API documentation for details on this). If however you want a like for like replacement, you can find updated JS files here. You will still need to make code changes, however these Javascript files are in line with what was previously supplied.
The output of {{ shopify:tokens }}
has changed, so that window.shopifyUrl
is now window.shopifyConfig.url
and window.shopifyToken
is now window.shopifyConfig.token
.
Upgrading from 3.x to 4.x
Due to the changes to how collections are processed, you will now need to set up webhooks for collection create, collection update, and collection delete. See the webhooks documentation for full details.
Product status and publish dates now respect the settings from Shopify. To enable date support ensure your Products collection has Publish Dates
enabled, with Past Date Behavior
public, and Future Date Behavior
hidden.
Your app needs to add the read_publications
and read_metaobjects
scopes.
Upgrading from 2.x to 3.x
Due to the migration to the official Shopify PHP library this update is being treated as a breaking change.
The following .env variables are now required:
SHOPIFY_ADMIN_TOKEN
SHOPIFY_AUTH_KEY
SHOPIFY_AUTH_PASSWORD
SHOPIFY_WEBHOOK_SECRET
If all of these are not defined please follow instructions in setup.
Upgrading from 1.x to 2.x
There are a number of breaking changes in the 2.x update:
Changes to tags
Most tags have been prefixed with shopify (eg {{ shopify:tokens }}
) and a number of tags have been removed or changed. Please refer to the tags documentation for the list of tags.
An overview of the changes is as follows:
{{ shopify_tokens }}
is now {{ shopify:tokens }}
{{ product_price }}
is now {{ shopify:product_price }}
{{ product_variants:generate }}
is now {{ shopify:variants:generate }}
{{ product_variants:loop }}
is now {{ shopify:variants }}
{{ product_variants:from_title }}
no longer exists, use {{ shopify:variants title:is="title_value" }}
{{ product_variants:from_index }}
no longer exists, use {{ {shopify:variants}[index] }}
{{ in_stock }}
is now {{ shopify:in_stock }}
Changes to urls
Any action URLs, webhook URLs or publish URLs have been changed from statamic-shopify
to shopify
e.g. the Product Create webhook is now https://YOURSITE/!/shopify/webhook/product/create