We are upgrading our supported jQuery version from 1.9.1 to 3.7.1 to address security risks and provide long-term compatibility. If you have a customized theme, we recommend you update to 3.7.1 to ensure the correct functioning of your theme.
Do I need to update my theme?
If you have purchased a theme from our theme store and haven’t made any changes to the code, you don’t have to update your theme. Our registered theme developers have been notified and they will make the necessary changes.
If you have modified your code since purchasing your theme, you’ll have to update your code to the new version.
What is the impact of updating?
All updated deprecated APIs will still work with jQuery version 1.9.1.
We will continue to host jQuery version 1.9.1 and jQuery-UI version 1.10.1 on our content delivery network (CDN). These old versions can be called in the theme’s layout templates:
<script src="{{ 'jquery-1-9-1.js' | url_core }}"></script>
<script src="{{ 'jquery-ui-1-10-1.js' | url_core }}"></script>
The new versions can be called in exactly the same way:
<script src="{{ 'jquery-3-7-1.js' | url_core }}"></script>
<script src="{{ 'jquery-ui-1-14-1.js' | url_core }}"></script>
What changes do I need to make?
Required change
The most significant breaking change that prevented an earlier upgrade appeared on secured pages, including the legacy checkouts (Onepage, Onestep, and the default multi-step).
Event handler
Depreciated (Version 1.9.1) | Use instead (Version 3.7.1) |
|
|
Recommended changes
Event handlers
Depreciated (Version 1.9.1) | Use instead (Version 3.7.1) |
|
|
Event shorthands
Depreciated (Version 1.9.1) | Use instead (Version 3.7.1) |
|
|
Ultility functions
Depreciated (Version 1.9.1) | Use instead (Version 3.7.1) |
jQuery.parseJSON() |
JSON.parse() |
jQuery.isArray() |
Array.isArray() |
jQuery.isFunction() |
typeof x === 'function' |
.hover(handlerIn, handlerOut) |
|
Selector changes
Depreciated (Version 1.9.1) | Use instead (Version 3.7.1) |
:eq() |
.eq() |
:first |
.first() |
Other deprecated features can be found in the jQuery Core Upgrade Guides for each version. Be sure to review them to ensure compatibility.
Is there a plugin available to assist with migrating to the new version?
When migrating your theme to 3.7.1, there is a plugin available to help streamline the process. It highlights any deprecated APIs in the console whenever they’re used, making it easier to update your code.
Load the Migrate plugin immediately after the jQuery file.
<script src="https://code.jquery.com/jquery-3.7.1.js"></script>
<script src="https://code.jquery.com/jquery-migrate-3.4.1.js"></script>
<script>jQuery.migrateEnableLogging = true;</script>
<script>jQuery.migrateMute = false;</script>
How do I find a customization partner?
If you no longer have a customization partner, we have compiled a list of partners in the Netherlands and Belgium. If you are not in one of these regions, you can reach out to Support for a suggestion.