diff --git a/projects/packages/jetpack-mu-wpcom/changelog/fix-php-fatal-in-wpcom b/projects/packages/jetpack-mu-wpcom/changelog/fix-php-fatal-in-wpcom new file mode 100644 index 0000000000000..e460fda027a8f --- /dev/null +++ b/projects/packages/jetpack-mu-wpcom/changelog/fix-php-fatal-in-wpcom @@ -0,0 +1,4 @@ +Significance: patch +Type: fixed + +Add a function_exists guard for wpcom_is_duplicate_views_experiment_enabled function 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 22b6eec4e9fc2..5bbc4ad0e9d6c 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 @@ -452,7 +452,7 @@ public static function load_verbum_comments_admin() { * Load Odyssey Stats in Simple sites. */ public static function load_wpcom_simple_odyssey_stats() { - if ( get_option( 'wpcom_admin_interface' ) === 'wp-admin' || wpcom_is_duplicate_views_experiment_enabled() ) { + if ( get_option( 'wpcom_admin_interface' ) === 'wp-admin' || ( function_exists( 'wpcom_is_duplicate_views_experiment_enabled' ) && wpcom_is_duplicate_views_experiment_enabled() ) ) { require_once __DIR__ . '/features/wpcom-simple-odyssey-stats/wpcom-simple-odyssey-stats.php'; } }