public function update_site_transient( $transient ) {
		foreach ( (array) $this->config as $plugin ) {
			if ( $this->can_update_repo( $plugin ) ) {
				$response = [
					'slug'         => $plugin->slug,
					'plugin'       => $plugin->file,
					'new_version'  => $plugin->remote_version,
					'url'          => $plugin->uri,
					'package'      => $plugin->download_link,
					'icons'        => $plugin->icons,
					'tested'       => $plugin->tested,
					'requires_php' => $plugin->requires_php,
					'branch'       => $plugin->branch,
					'branches'     => array_keys( $plugin->branches ),
					'type'         => "{$plugin->git}-{$plugin->type}",
				];

				// Skip on RESTful updating.
				if ( isset( $_GET['action'], $_GET['plugin'] ) &&
					'github-updater-update' === $_GET['action'] &&
					$response['slug'] === $_GET['plugin']
				) {
					continue;
				}

				// Pull update from dot org if not overriding.
				if ( ! $this->override_dot_org( 'plugin', $plugin ) ) {
					continue;
				}

				$transient->response[ $plugin->file ] = (object) $response;
			} else {
				/**
				 * Filter to return array of overrides to dot org.
				 *
				 * @since 8.5.0
				 * @return array
				 */
				$overrides = apply_filters( 'github_updater_override_dot_org', [] );
				if ( isset( $transient->response[ $plugin->file ] ) && in_array( $plugin->file, $overrides, true ) ) {
					unset( $transient->response[ $plugin->file ] );
				}
			}

			// Set transient on rollback.
			if ( isset( $_GET['plugin'], $_GET['rollback'] ) && $plugin->file === $_GET['plugin']
			) {
				$transient->response[ $plugin->file ] = $this->set_rollback_transient( 'plugin', $plugin );
			}
		}

		return $transient;
	}
public function update_site_transient( $transient ) {
		foreach ( (array) $this->config as $plugin ) {
			if ( $this->can_update_repo( $plugin ) ) {
				$response = [
					'slug'         => $plugin->slug,
					'plugin'       => $plugin->file,
					'new_version'  => $plugin->remote_version,
					'url'          => $plugin->uri,
					'package'      => $plugin->download_link,
					'icons'        => $plugin->icons,
					'tested'       => $plugin->tested,
					'requires_php' => $plugin->requires_php,
					'branch'       => $plugin->branch,
					'branches'     => array_keys( $plugin->branches ),
					'type'         => "{$plugin->git}-{$plugin->type}",
				];

				// Skip on RESTful updating.
				if ( isset( $_GET['action'], $_GET['plugin'] ) &&
					'github-updater-update' === $_GET['action'] &&
					$response['slug'] === $_GET['plugin']
				) {
					continue;
				}

				// Pull update from dot org if not overriding.
				if ( ! $this->override_dot_org( 'plugin', $plugin ) ) {
					continue;
				}

				$transient->response[ $plugin->file ] = (object) $response;
			} else {
				/**
				 * Filter to return array of overrides to dot org.
				 *
				 * @since 8.5.0
				 * @return array
				 */
				$overrides = apply_filters( 'github_updater_override_dot_org', [] );
				if ( isset( $transient->response[ $plugin->file ] ) && in_array( $plugin->file, $overrides, true ) ) {
					unset( $transient->response[ $plugin->file ] );
				}
			}

			// Set transient on rollback.
			if ( isset( $_GET['plugin'], $_GET['rollback'] ) && $plugin->file === $_GET['plugin']
			) {
				$transient->response[ $plugin->file ] = $this->set_rollback_transient( 'plugin', $plugin );
			}
		}

		return $transient;
	}
public function update_site_transient ( $ transient ) { foreach ( ( array ) $ this -> config as $ plugin ) { if ( $ this -> can_update_repo ( $ plugin ) ) { $ response = [ 'slug' => $ plugin -> slug , 'plugin' => $ plugin -> file , 'new_version' => $ plugin -> remote_version , 'url' => $ plugin -> uri , 'package' => $ plugin -> download_link , 'icons' => $ plugin -> icons , 'tested' => $ plugin -> tested , 'requires_php' => $ plugin -> requires_php , 'branch' => $ plugin -> branch , 'branches' => array_keys ( $ plugin -> branches ) , 'type' => "{$plugin->git}-{$plugin->type}" , ] ; // Skip on RESTful updating. if ( isset ( $ _GET [ 'action' ] , $ _GET [ 'plugin' ] ) && 'github-updater-update' === $ _GET [ 'action' ] && $ response [ 'slug' ] === $ _GET [ 'plugin' ] ) { continue ; } // Pull update from dot org if not overriding. if ( ! $ this -> override_dot_org ( 'plugin' , $ plugin ) ) { continue ; } $ transient -> response [ $ plugin -> file ] = ( object ) $ response ; } else { /**
				 * Filter to return array of overrides to dot org.
				 *
				 * @since 8.5.0
				 * @return array
				 */ $ overrides = apply_filters ( 'github_updater_override_dot_org' , [ ] ) ; if ( isset ( $ transient -> response [ $ plugin -> file ] ) && in_array ( $ plugin -> file , $ overrides , true ) ) { unset ( $ transient -> response [ $ plugin -> file ] ) ; } } // Set transient on rollback. if ( isset ( $ _GET [ 'plugin' ] , $ _GET [ 'rollback' ] ) && $ plugin -> file === $ _GET [ 'plugin' ] ) { $ transient -> response [ $ plugin -> file ] = $ this -> set_rollback_transient ( 'plugin' , $ plugin ) ; } } return $ transient ; }
Hook into site_transient_update_plugins to update from GitHub.

@param \stdClass $transient

@return mixed
Hook into site_transient_update_plugins to update from GitHub .