From bd9961703b25b48dec3d16e25f163851a10c85f1 Mon Sep 17 00:00:00 2001 From: Marcin Bot Date: Fri, 12 Jul 2019 15:35:49 +0100 Subject: [PATCH] Fix namespaced Jetpack tracks_get_identity --- includes/tracks/class-wc-tracks-client.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/tracks/class-wc-tracks-client.php b/includes/tracks/class-wc-tracks-client.php index 08bc0a74bc9..f3f8e1d8a57 100644 --- a/includes/tracks/class-wc-tracks-client.php +++ b/includes/tracks/class-wc-tracks-client.php @@ -139,7 +139,7 @@ class WC_Tracks_Client { public static function get_identity( $user_id ) { $jetpack_lib = '/tracks/client.php'; - if ( class_exists( 'Jetpack' ) && defined( JETPACK__VERSION ) ) { + if ( class_exists( 'Jetpack' ) && defined( 'JETPACK__VERSION' ) ) { if ( version_compare( JETPACK__VERSION, '7.5', '<' ) ) { if ( file_exists( jetpack_require_lib_dir() . $jetpack_lib ) ) { include_once jetpack_require_lib_dir() . $jetpack_lib; @@ -148,7 +148,8 @@ class WC_Tracks_Client { } } } else { - return Automattic\Jetpack\Tracking::tracks_get_identity( $user_id ); + $tracking = new Automattic\Jetpack\Tracking(); + return $tracking->tracks_get_identity( $user_id ); } }