From ad5b3302abbd1c7196aa712c13276734e747026a Mon Sep 17 00:00:00 2001 From: Rinat K Date: Fri, 11 Oct 2024 18:04:53 -0500 Subject: [PATCH] Remove Jetpack loader conditionals for WP < 6.0 (#5919) * Remove Jetpack loader conditionals for WP < 6.0 * Fix tests --- jetpack.php | 8 +------- tests/test-jetpack.php | 16 +++++++--------- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/jetpack.php b/jetpack.php index 0229baad5f..1a74b5c48e 100644 --- a/jetpack.php +++ b/jetpack.php @@ -19,13 +19,7 @@ function vip_default_jetpack_version() { global $wp_version; - if ( version_compare( $wp_version, '5.9', '<' ) ) { - // WordPress 5.8.x and older. Not including 5.9. - return '10.9'; - } elseif ( version_compare( $wp_version, '6.0', '<' ) ) { - // WordPress 5.9.x - return '11.4'; - } elseif ( version_compare( $wp_version, '6.1', '<' ) ) { + if ( version_compare( $wp_version, '6.1', '<' ) ) { // WordPress 6.0.x return '12.0'; } elseif ( version_compare( $wp_version, '6.2', '<' ) ) { diff --git a/tests/test-jetpack.php b/tests/test-jetpack.php index 82df349221..5f17765797 100644 --- a/tests/test-jetpack.php +++ b/tests/test-jetpack.php @@ -11,15 +11,13 @@ public function test__vip_default_jetpack_version() { $versions_map = [ // WordPress version => Jetpack version - '5.8.6' => '10.9', - '5.9' => '11.4', - '5.9.5' => '11.4', - '6.0' => '12.0', - '6.1' => '12.5', - '6.2' => '12.8', - '6.3' => '13.1', - '6.4' => '13.6', - '6.5' => $latest, + '6.0' => '12.0', + '6.1' => '12.5', + '6.2' => '12.8', + '6.3' => '13.1', + '6.4' => '13.6', + '6.5' => $latest, + '6.6' => $latest, ]; foreach ( $versions_map as $wordpress_version => $jetpack_version ) {