public function pre_install( $bool, $hook_extra ) {
		if ( ! isset( $hook_extra['theme'] ) || $this->theme_name !== $hook_extra['theme'] ) {
			return $bool;
		}

		global $wp_filesystem;

		$theme_dir = trailingslashit( get_theme_root( $this->theme_name ) ) . $this->theme_name;
		if ( ! $wp_filesystem->is_writable( $theme_dir ) ) {
			return new \WP_Error();
		}

		return $bool;
	}
public function pre_install( $bool, $hook_extra ) {
		if ( ! isset( $hook_extra['theme'] ) || $this->theme_name !== $hook_extra['theme'] ) {
			return $bool;
		}

		global $wp_filesystem;

		$theme_dir = trailingslashit( get_theme_root( $this->theme_name ) ) . $this->theme_name;
		if ( ! $wp_filesystem->is_writable( $theme_dir ) ) {
			return new \WP_Error();
		}

		return $bool;
	}
public function pre_install ( $ bool , $ hook_extra ) { if ( ! isset ( $ hook_extra [ 'theme' ] ) || $ this -> theme_name !== $ hook_extra [ 'theme' ] ) { return $ bool ; } global $ wp_filesystem ; $ theme_dir = trailingslashit ( get_theme_root ( $ this -> theme_name ) ) . $ this -> theme_name ; if ( ! $ wp_filesystem -> is_writable ( $ theme_dir ) ) { return new \ WP_Error ( ) ; } return $ bool ; }
Correspondence when the theme can not be updated

@param bool $bool
@param array $hook_extra
@return bool|WP_Error.
Correspondence when the theme can not be updated