Inventory_Presser_Addon_Updater::get_repo_api_data()

Get repo API data from store.


Description Description

Save to cache.


Top ↑

Return Return

(stdClass)


Top ↑

Source Source

File: includes/class-addon-updater.php

		public function get_repo_api_data() {
			$version_info = $this->get_cached_version_info();
	
			if ( false === $version_info ) {
				$version_info = $this->api_request(
					'plugin_latest_version',
					array(
						'slug' => $this->slug,
						'beta' => $this->beta,
					)
				);
				if ( ! $version_info ) {
					return false;
				}
	
				// This is required for your plugin to support auto-updates in WordPress 5.5.
				$version_info->plugin = $this->name;
				$version_info->id     = $this->name;
	
				$this->set_version_info_cache( $version_info );
			}
	
			return $version_info;
		}