From af17709ca8cd8fd2f79411893a04a97cf177f2a1 Mon Sep 17 00:00:00 2001 From: roccotripaldi Date: Tue, 30 Aug 2016 09:00:45 -0400 Subject: [PATCH] Jetpack Onboarding Endpoints Check for `Jetpack_Landing_Page` class before initializing. The newest version of Jetpack removes `Jetpack_Landing_Page` entirely, so our endpoint needs to check for it. --- class.jetpack-onboarding-end-points.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/class.jetpack-onboarding-end-points.php b/class.jetpack-onboarding-end-points.php index d73b57e..de02bf3 100644 --- a/class.jetpack-onboarding-end-points.php +++ b/class.jetpack-onboarding-end-points.php @@ -684,8 +684,10 @@ static function configure_jetpack() { } } - $jp_landing_page = new Jetpack_Landing_Page(); - $jp_landing_page->add_actions(); + if ( class_exists( 'Jetpack_Landing_Page' ) ) { + $jp_landing_page = new Jetpack_Landing_Page(); + $jp_landing_page->add_actions(); + } // redirect to activate link $connect_url = Jetpack::init()->build_connect_url( true, admin_url('index.php#welcome/steps/'.$return_to_step) );