File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed
Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -204,9 +204,8 @@ private function init_admin_subscribers() {
204204 $ this ->container ->addServiceProvider ( new OptimizationAdminServiceProvider () );
205205 $ this ->container ->addServiceProvider ( new DomainChangeServiceProvider () );
206206 $ this ->container ->addServiceProvider ( new AdminLazyloadCSSServiceProvider () );
207- $ this ->container ->addServiceProvider ( new TrackingServiceProvider () );
208207
209- return [
208+ $ subscribers = [
210209 'beacon ' ,
211210 'settings_page_subscriber ' ,
212211 'deactivation_intent_subscriber ' ,
@@ -232,8 +231,17 @@ private function init_admin_subscribers() {
232231 'preconnect_external_domains_admin_subscriber ' ,
233232 'media_fonts_admin_subscriber ' ,
234233 'preload_fonts_admin_subscriber ' ,
235- 'tracking_subscriber ' ,
236234 ];
235+
236+ // Only add tracking service provider if cURL extension is loaded.
237+ // MixPanel (used by TrackingServiceProvider) requires cURL and will throw a fatal error if not available.
238+ // This prevents crashes when WP Rocket is installed on servers without cURL support.
239+ if ( function_exists ( 'curl_init ' ) ) {
240+ $ this ->container ->addServiceProvider ( new TrackingServiceProvider () );
241+ $ subscribers [] = 'tracking_subscriber ' ;
242+ }
243+
244+ return $ subscribers ;
237245 }
238246
239247 /**
Original file line number Diff line number Diff line change 33 * Plugin Name: WP Rocket
44 * Plugin URI: https://wp-rocket.me
55 * Description: The best WordPress performance plugin.
6- * Version: 3.19.1.1
6+ * Version: 3.19.1.2
77 * Requires at least: 5.8
88 * Requires PHP: 7.3
99 * Code Name: Iego
2020defined ( 'ABSPATH ' ) || exit;
2121
2222// Rocket defines.
23- define ( 'WP_ROCKET_VERSION ' , '3.19.1.1 ' );
23+ define ( 'WP_ROCKET_VERSION ' , '3.19.1.2 ' );
2424define ( 'WP_ROCKET_WP_VERSION ' , '5.8 ' );
2525define ( 'WP_ROCKET_WP_VERSION_TESTED ' , '6.3.1 ' );
2626define ( 'WP_ROCKET_PHP_VERSION ' , '7.3 ' );
You can’t perform that action at this time.
0 commit comments