diff --git a/projects/plugins/wpcomsh/feature-plugins/staging-sites.php b/projects/plugins/wpcomsh/feature-plugins/staging-sites.php index b084910dad0cc..78cc6344c6301 100644 --- a/projects/plugins/wpcomsh/feature-plugins/staging-sites.php +++ b/projects/plugins/wpcomsh/feature-plugins/staging-sites.php @@ -5,11 +5,6 @@ * @package wpcomsh */ -/** - * Name of option that shows if the site is a staging site. - */ -const WPCOM_IS_STAGING_SITE_OPTION_NAME = 'wpcom_is_staging_site'; - /** * Returns Atomic persistent data value for wpcom_is_staging_site. * @@ -30,22 +25,3 @@ function wpcomsh_is_staging_site_get_atomic_persistent_data( $wpcom_is_staging_s // need to hook to default_option_* too because if this option doesn't exist, the hook wouldn't run. add_filter( 'default_option_wpcom_is_staging_site', 'wpcomsh_is_staging_site_get_atomic_persistent_data' ); add_filter( 'option_wpcom_is_staging_site', 'wpcomsh_is_staging_site_get_atomic_persistent_data' ); - -/** - * Disable Jetpack staging mode for wpcom staging sites. - * - * We set WP_ENVIRONMENT_TYPE constant to 'staging' for WPCOM staging sites, but we don't want - * Jetpack working in staging mode to let us use Jetpack sync and other features for staging sites. - * - * @param bool $is_staging If the current site is a staging site. - * - * @return false|mixed - */ -function wpcomsh_disable_jetpack_staging_mode_for_wpcom_staging_site( $is_staging ) { - if ( get_option( WPCOM_IS_STAGING_SITE_OPTION_NAME ) ) { - return false; - } - - return $is_staging; -} -add_filter( 'jetpack_is_staging_site', 'wpcomsh_disable_jetpack_staging_mode_for_wpcom_staging_site' ); diff --git a/projects/plugins/wpcomsh/tests/test-staging-sites.php b/projects/plugins/wpcomsh/tests/test-staging-sites.php deleted file mode 100644 index 75716d52448c0..0000000000000 --- a/projects/plugins/wpcomsh/tests/test-staging-sites.php +++ /dev/null @@ -1,33 +0,0 @@ -assertFalse( apply_filters( 'jetpack_is_staging_site', false ) ); - $this->assertTrue( apply_filters( 'jetpack_is_staging_site', true ) ); - } - - /** - * Ensure that the filter always returns false when the site is a staging site. - * - * @return void - */ - public function test_wpcomsh_disable_jetpack_staging_mode_always_false_staging_site() { - add_option( WPCOM_IS_STAGING_SITE_OPTION_NAME, 1 ); - $this->assertFalse( apply_filters( 'jetpack_is_staging_site', false ) ); - $this->assertFalse( apply_filters( 'jetpack_is_staging_site', true ) ); - } -}