Skip to content

Commit

Permalink
RDV: Add a function_exists guard that prevents fatals
Browse files Browse the repository at this point in the history
  • Loading branch information
BogdanUngureanu committed Dec 20, 2024
1 parent c98bbfd commit 8aadfd4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Add a function_exists guard for wpcom_is_duplicate_views_experiment_enabled function
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}
}
Expand Down

0 comments on commit 8aadfd4

Please sign in to comment.