protected function set_rollback_transient( $type, $repo, $set_transient = false ) {
		$repo_api      = Singleton::get_instance( 'API', $this )->get_repo_api( $repo->git, $repo );
		$this->tag     = isset( $_GET['rollback'] ) ? $_GET['rollback'] : false;
		$slug          = 'plugin' === $type ? $repo->file : $repo->slug;
		$download_link = $repo_api->construct_download_link( $this->tag );

		/**
		 * Filter download link so developers can point to specific ZipFile
		 * to use as a download link during a branch switch.
		 *
		 * @since 8.6.0
		 *
		 * @param string    $download_link Download URL.
		 * @param /stdClass $repo
		 * @param string    $this->tag     Branch or tag for rollback.
		 */
		$download_link = apply_filters_deprecated(
			'github_updater_set_rollback_package',
			[ $download_link, $repo, $this->tag ],
			'8.8.0',
			'github_updater_post_construct_download_link'
		);

		$rollback = [
			$type         => $slug,
			'new_version' => $this->tag,
			'url'         => $repo->uri,
			'package'     => $download_link,
			'branch'      => $repo->branch,
			'branches'    => $repo->branches,
			'type'        => $repo->type,
		];

		if ( 'plugin' === $type ) {
			$rollback['slug'] = $repo->slug;
			$rollback         = (object) $rollback;
		}

		return $rollback;
	}
protected function set_rollback_transient( $type, $repo, $set_transient = false ) {
		$repo_api      = Singleton::get_instance( 'API', $this )->get_repo_api( $repo->git, $repo );
		$this->tag     = isset( $_GET['rollback'] ) ? $_GET['rollback'] : false;
		$slug          = 'plugin' === $type ? $repo->file : $repo->slug;
		$download_link = $repo_api->construct_download_link( $this->tag );

		/**
		 * Filter download link so developers can point to specific ZipFile
		 * to use as a download link during a branch switch.
		 *
		 * @since 8.6.0
		 *
		 * @param string    $download_link Download URL.
		 * @param /stdClass $repo
		 * @param string    $this->tag     Branch or tag for rollback.
		 */
		$download_link = apply_filters_deprecated(
			'github_updater_set_rollback_package',
			[ $download_link, $repo, $this->tag ],
			'8.8.0',
			'github_updater_post_construct_download_link'
		);

		$rollback = [
			$type         => $slug,
			'new_version' => $this->tag,
			'url'         => $repo->uri,
			'package'     => $download_link,
			'branch'      => $repo->branch,
			'branches'    => $repo->branches,
			'type'        => $repo->type,
		];

		if ( 'plugin' === $type ) {
			$rollback['slug'] = $repo->slug;
			$rollback         = (object) $rollback;
		}

		return $rollback;
	}
protected function set_rollback_transient ( $ type , $ repo , $ set_transient = false ) { $ repo_api = Singleton :: get_instance ( 'API' , $ this ) -> get_repo_api ( $ repo -> git , $ repo ) ; $ this -> tag = isset ( $ _GET [ 'rollback' ] ) ? $ _GET [ 'rollback' ] : false ; $ slug = 'plugin' === $ type ? $ repo -> file : $ repo -> slug ; $ download_link = $ repo_api -> construct_download_link ( $ this -> tag ) ; /**
		 * Filter download link so developers can point to specific ZipFile
		 * to use as a download link during a branch switch.
		 *
		 * @since 8.6.0
		 *
		 * @param string    $download_link Download URL.
		 * @param /stdClass $repo
		 * @param string    $this->tag     Branch or tag for rollback.
		 */ $ download_link = apply_filters_deprecated ( 'github_updater_set_rollback_package' , [ $ download_link , $ repo , $ this -> tag ] , '8.8.0' , 'github_updater_post_construct_download_link' ) ; $ rollback = [ $ type => $ slug , 'new_version' => $ this -> tag , 'url' => $ repo -> uri , 'package' => $ download_link , 'branch' => $ repo -> branch , 'branches' => $ repo -> branches , 'type' => $ repo -> type , ] ; if ( 'plugin' === $ type ) { $ rollback [ 'slug' ] = $ repo -> slug ; $ rollback = ( object ) $ rollback ; } return $ rollback ; }
Update transient for rollback or branch switch.

@param string    $type          plugin|theme.
@param \stdClass $repo
@param bool      $set_transient Default false, if true then set update transient.

@return array $rollback Rollback transient.
Update transient for rollback or branch switch .