Inventory_Presser_Addon_Updater::set_version_info_cache( string $value = '', string $cache_key = '' )

Adds the plugin version information to the database.


Parameters Parameters

$value

(string) (Optional)

Default value: ''

$cache_key

(string) (Optional)

Default value: ''


Top ↑

Source Source

File: includes/class-addon-updater.php

		public function set_version_info_cache( $value = '', $cache_key = '' ) {
	
			if( empty( $cache_key ) ) {
				$cache_key = $this->cache_key;
			}
	
			$data = array(
				'timeout' => strtotime( '+3 hours', time() ),
				'value'   => json_encode( $value )
			);
	
			update_option( $cache_key, $data, 'no' );
	
			// Delete the duplicate option
			delete_option( 'edd_api_request_' . md5( serialize( $this->slug . $this->api_data['license'] . $this->beta ) ) );
		}