From 6821a5d288d6e491d9b78a5898162dc691bb4bdf Mon Sep 17 00:00:00 2001 From: arthur Date: Thu, 4 Jun 2026 17:50:04 +0800 Subject: [PATCH] WPCOM: Remove obsolete React version-bump hotfix The hotfix in #47766 normalized the ?ver= query string on react/react-dom/react-jsx-runtime to 18.3.1 to bust a stale CDN cache introduced by Gutenberg v22.6.0. That cache issue is long resolved and WordPress.com now serves React 19, so pinning to 18.3.1 is at best a no-op and at worst misleading cache-busting metadata. --- .../remove-wpcom-react-version-hotfix | 4 ++++ .../src/class-jetpack-mu-wpcom.php | 1 - .../features/wpcom-hotfixes/wpcom-hotfixes.php | 18 ------------------ 3 files changed, 4 insertions(+), 19 deletions(-) create mode 100644 projects/packages/jetpack-mu-wpcom/changelog/remove-wpcom-react-version-hotfix delete mode 100644 projects/packages/jetpack-mu-wpcom/src/features/wpcom-hotfixes/wpcom-hotfixes.php diff --git a/projects/packages/jetpack-mu-wpcom/changelog/remove-wpcom-react-version-hotfix b/projects/packages/jetpack-mu-wpcom/changelog/remove-wpcom-react-version-hotfix new file mode 100644 index 000000000000..b2ff69e9b393 --- /dev/null +++ b/projects/packages/jetpack-mu-wpcom/changelog/remove-wpcom-react-version-hotfix @@ -0,0 +1,4 @@ +Significance: patch +Type: removed + +Remove the React version hotfix that pinned react/react-dom/react-jsx-runtime to 18.3.1; the underlying Gutenberg CDN-cache issue is resolved and WordPress.com now ships React 19. diff --git a/projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php b/projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php index ac1585984eed..445c4e688554 100644 --- a/projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php +++ b/projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php @@ -308,7 +308,6 @@ public static function load_features() { require_once __DIR__ . '/features/wpcom-block-editor/class-jetpack-wpcom-block-editor.php'; require_once __DIR__ . '/features/wpcom-block-editor/functions.editor-type.php'; require_once __DIR__ . '/features/wpcom-dashboard/class-wpcom-dashboard.php'; - require_once __DIR__ . '/features/wpcom-hotfixes/wpcom-hotfixes.php'; require_once __DIR__ . '/features/wpcom-logout/wpcom-logout.php'; require_once __DIR__ . '/features/wpcom-themes/wpcom-theme-fixes.php'; require_once __DIR__ . '/features/wpcom-post-list/wpcom-post-types-tracking.php'; diff --git a/projects/packages/jetpack-mu-wpcom/src/features/wpcom-hotfixes/wpcom-hotfixes.php b/projects/packages/jetpack-mu-wpcom/src/features/wpcom-hotfixes/wpcom-hotfixes.php deleted file mode 100644 index 381e17d74509..000000000000 --- a/projects/packages/jetpack-mu-wpcom/src/features/wpcom-hotfixes/wpcom-hotfixes.php +++ /dev/null @@ -1,18 +0,0 @@ -registered[ $handle ] ) ) { - $scripts->registered[ $handle ]->ver = '18.3.1'; - } - } - }, - 20 // priority 20 runs after Gutenberg's priority 10 -);