diff --git a/unit-tests/Tests/Version4/Leaderboards.php b/unit-tests/Tests/Version4/Leaderboards.php index 4afb7185997..af90d308365 100644 --- a/unit-tests/Tests/Version4/Leaderboards.php +++ b/unit-tests/Tests/Version4/Leaderboards.php @@ -47,6 +47,10 @@ class Leaderboards extends WC_REST_Unit_Test_Case { * Setup our test server, endpoints, and user info. */ public function setUp() { + if ( ! class_exists( '\WC_Admin_Reports_Sync' ) ) { + $this->markTestSkipped( 'Skipping reports tests - WC_Admin_Reports_Sync class not found.' ); + return; + } parent::setUp(); wp_set_current_user( self::$user ); }