diff --git a/projects/packages/jetpack-mu-wpcom/changelog/update-jetpack-mu-wpcom-load-coming-soon-remove-etk-version-check b/projects/packages/jetpack-mu-wpcom/changelog/update-jetpack-mu-wpcom-load-coming-soon-remove-etk-version-check new file mode 100644 index 0000000000000..3af6159f761de --- /dev/null +++ b/projects/packages/jetpack-mu-wpcom/changelog/update-jetpack-mu-wpcom-load-coming-soon-remove-etk-version-check @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +Coming Soon: Add more checks to the ETK version comparison. 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 2c75170257510..deed61cbc4bdf 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 @@ -276,9 +276,13 @@ public static function load_coming_soon() { * Explicitly pass $markup = false in get_plugin_data to avoid indirectly calling wptexturize that could cause unintended side effects. * See: https://developer.wordpress.org/reference/functions/get_plugin_data/ */ + $fse_plugin = 'full-site-editing/full-site-editing-plugin.php'; + $fse_plugin_path = WP_PLUGIN_DIR . '/' . $fse_plugin; $invalid_fse_version_active = - is_plugin_active( 'full-site-editing/full-site-editing-plugin.php' ) && - version_compare( get_plugin_data( WP_PLUGIN_DIR . '/full-site-editing/full-site-editing-plugin.php', false )['Version'], '3.56084', '<' ); + file_exists( $fse_plugin_path ) && + is_file( $fse_plugin_path ) && + is_plugin_active( $fse_plugin ) && + version_compare( get_plugin_data( $fse_plugin_path, false )['Version'], '3.56084', '<' ); if ( $invalid_fse_version_active ) { return;