Getting Started
Upgrading
Upgrading to v9
New package name and namespace
The addon is now maintained by Thought Collective. The package is thoughtco/shopify and the PHP namespace is Thoughtco\Shopify (was statamic-rad-pack/shopify and StatamicRadPack\Shopify).
Swap the package:
composer remove statamic-rad-pack/shopify
composer require thoughtco/shopify
Composer treats this as a new package, so Statamic won't run the addon's update scripts on its own. Run them yourself, passing the version you were upgrading from:
php please updates:run 8.0.0 --package=thoughtco/shopify
Replace
StatamicRadPack\ShopifywithThoughtco\Shopifyin your code and your publishedconfig/shopify.php.
Until you do step 3, the old class names still resolve to the new classes, but they log a deprecation notice. This means your published config, hooks, subclasses and any jobs that were queued before you upgraded keep working. This compatibility layer will be removed in the next major version.
The exception is event listeners. Laravel matches listeners on the event's real class name, so listeners registered for (or type-hinting) StatamicRadPack\Shopify\Events\... will stop firing with no error. Update those to Thoughtco\Shopify\Events\... before you deploy.
API version
The default Admin and Storefront API version is now 2026-01. Shopify only supports each version for 12 months, so if you have pinned an older version with SHOPIFY_API_VERSION you should update it.
CP import endpoints use POST
The control panel import endpoints (/cp/shopify/import/...) now only accept POST requests. The bundled dashboard is updated; if you call these endpoints from your own code, switch to POST (the single product import takes product in the request body).
{{ shopify:tokens }} output
window.shopifyConfig is now output as JSON (e.g. {"url":"...","token":"..."}). The object has the same keys, so the bundled JS and anything reading window.shopifyConfig keeps working; only exact string matches on the output need updating.
Cart scripts
The bundled cart scripts (cart.js, alpine.js) have improvements you get by re-publishing them: php artisan vendor:publish --tag=shopify-scripts --force (this overwrites your copies in resources/js/vendor/shopify, so re-apply any changes you've made to them). Everything is backwards compatible:
In markets mode, carts use the market's country for prices and currency, and follow market changes.
On multi-store sites each store keeps its own cart. Single-store sites keep using the existing cart.
Failed cart requests no longer throw errors in the browser; they send a
shopify.cart.errorevent instead.Lines and the cart have raw
amount/subtotalAmount/currencyCodevalues alongside the formatted prices.A new, opt-in
money_format: 'intl'setting formats prices for the site's locale. Prices look the same unless you turn it on.There's a new
money.jsmodule, so update the imports in yoursite.jsif you import the scripts individually.
{{ shopify:product_price store="..." }} now uses that store's or market's currency symbol, instead of always using the default currency.
Details tab in the product blueprint
New installs get a read-only Details tab with Organization (vendor, type, tags), Pricing and inventory (in stock, on sale, lowest and highest price) and Shopify record (product ID, published date, last imported) sections, with only the slug left in the sidebar.
On existing sites, an update script adds the new fields (in_stock, on_sale, price_min, price_max, shopify_synced_at) to a Details tab, in their sections. It skips fields your blueprint already has and doesn't move any of your other fields; drag them into the tab in the blueprint editor if you want the new layout. If you manage blueprints in version control, commit the updated resources/blueprints/collections/products/*.yaml after upgrading.
Activity log
A new activity log under Shopify > Activity records every webhook and import. It's stored in files by default. If your site runs on more than one server, set SHOPIFY_ACTIVITY_DRIVER=database and run php artisan migrate. Old entries are pruned daily by the scheduler.
ImportSingleProductJob and ImportCollectionJob take a new optional last constructor argument, $activityId. If you dispatch them yourself nothing needs to change, but use ActivityLog::queueProductImport() / queueCollectionImport() if you want those imports to appear in the log.
Images changed in Shopify
Imports now update images that have changed in Shopify, by re-uploading a new version over the asset or replacing it everywhere it's used (see images). Images imported before this version don't know which Shopify image they came from yet, so the first import after upgrading only records that, without downloading anything again. An image whose file name changes before then is imported as a new asset, as before.
New webhooks: stock, cancellations and refunds
Three new webhooks keep stock and purchase history up to date: Inventory Level Update, Order Cancelled and Refund Created (see webhooks). Run php artisan shopify:webhooks:register (with --store for each store on multi-store sites) to add them, and add --prune to remove any left over from an old domain; the Webhook Status card shows them as not registered until you do. They need no new scopes.
Purchase history now goes down when items are refunded or cancelled, so total_purchased is the net number sold from the time you register them. Past refunds aren't applied retrospectively.
Customers on multi-store sites
On unified and localized multi-store sites:
{{ shopify:address_form }}takes astoreparam. Add it (e.g.store="uk"), as with the customer tags: without it, addresses can't be saved for customers linked through the webhooks, who only haveshopify_ids.With
update_users_in_shopify, users are now updated in every store they're linked to, and new users are created inSHOPIFY_MULTI_STORE_CUSTOMER_STORE(or the primary store), with the ID saved undershopify_ids. Previously they were only synced through the default (non-store) credentials and saved asshopify_id.
Markets mode webhooks
In markets mode, webhooks were rejected with a 403 ("Unknown shop domain") because the store was looked up in multi_store.stores, which markets mode doesn't use. They're now checked as in single-store mode, with SHOPIFY_WEBHOOK_SECRET. Customers in markets mode use shopify_id, and the customer tags ignore their store param there.
New collections are imported with their products
When a product is in a collection that hasn't been imported, the collection is now imported too, and the product is assigned to it. Previously the product skipped that collection until you ran php artisan shopify:import:collections and imported the product again. Set SHOPIFY_IMPORT_MISSING_COLLECTIONS=false to keep the old behaviour.
Removed
The
langconfig option (unused; the tag wording lives in the translation files).The deprecated
{{ shopify:variants:loop }},{{ shopify:variants:from_title }}and{{ shopify:variants:from_index }}tags, which only output a "no longer supported" message.The unused
resources/js/deprecated-jsscripts.
Upgrading from 7.x to 8.x
This release changes the underlying Shopify PHP library from shopify/shopify-api to shopify/shopify-app-php.
If you have been previous calling the Shopify GraphQL Client using \Shopify\Clients\Graphql::query() you will need to update this to use the wrapper we provide: \Thoughtco\Shopify\Clients\Graphql::query().
Upgrading to 7.11.0
Address endpoint behaviour change
The /!/shopify/address create, update and delete endpoints now require an authenticated Statamic user and always act on that user's linked Shopify customer. A customer_id supplied in the request (or via {{ shopify:address_form customer_id="..." }}) is ignored. redirect / error_redirect values that point off-site are also ignored. If your storefront relied on calling these endpoints for a guest or for an arbitrary customer, that will no longer work.
Customer tag scoping
The customer_id parameter on {{ shopify:customer }}, {{ shopify:customer:addresses }} and {{ shopify:customer:orders }} is no longer supported. These tags now always return data for the logged in user. Previously a customer_id could be passed to fetch any customer, which meant a template rendering it from request input would expose other customers' data.
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_TOKENSHOPIFY_AUTH_KEYSHOPIFY_AUTH_PASSWORDSHOPIFY_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