diff --git a/plugins/woocommerce-blocks/assets/js/base/utils/lazy-load-script.ts b/plugins/woocommerce-blocks/assets/js/base/utils/lazy-load-script.ts index 4035be337d2..1d39a0dd8f3 100644 --- a/plugins/woocommerce-blocks/assets/js/base/utils/lazy-load-script.ts +++ b/plugins/woocommerce-blocks/assets/js/base/utils/lazy-load-script.ts @@ -123,7 +123,7 @@ const lazyLoadScript = ( { id: `${ handle }-js`, onerror: reject, onload, - src: version ? `${ src }?${ version }` : src, + src: version ? `${ src }?ver=${ version }` : src, } ); } ); }; diff --git a/plugins/woocommerce-blocks/assets/js/base/utils/preload-script.ts b/plugins/woocommerce-blocks/assets/js/base/utils/preload-script.ts index ed63b0c8459..efa578a8dc4 100644 --- a/plugins/woocommerce-blocks/assets/js/base/utils/preload-script.ts +++ b/plugins/woocommerce-blocks/assets/js/base/utils/preload-script.ts @@ -19,7 +19,7 @@ const preloadScript = ( { if ( handleScriptElements.length === 0 ) { const prefetchLink = document.createElement( 'link' ); - prefetchLink.href = version ? `${ src }?${ version }` : src; + prefetchLink.href = version ? `${ src }?ver=${ version }` : src; prefetchLink.rel = 'preload'; prefetchLink.as = 'script'; prefetchLink.id = `${ handle }-js-prefetch`;