diff --git a/modules/likes.php b/modules/likes.php index cc178ca772848..efc264d7ff0c3 100644 --- a/modules/likes.php +++ b/modules/likes.php @@ -263,7 +263,10 @@ function action_init() { return; } - if ( Jetpack_AMP_Support::is_amp_request() ) { + if ( + class_exists( 'Jetpack_AMP_Support' ) + && Jetpack_AMP_Support::is_amp_request() + ) { return; } diff --git a/modules/widgets/contact-info.php b/modules/widgets/contact-info.php index 7a0a373e5515a..93b4695b95c8c 100644 --- a/modules/widgets/contact-info.php +++ b/modules/widgets/contact-info.php @@ -343,7 +343,10 @@ function build_map( $address, $api_key = null ) { $iframe_html = sprintf( '', $iframe_attributes ); - if ( ! Jetpack_AMP_Support::is_amp_request() ) { + if ( + ! class_exists( 'Jetpack_AMP_Support' ) + || ! Jetpack_AMP_Support::is_amp_request() + ) { return $iframe_html; }