Inventory_Presser_Addon_Updater::set_version_info_cache( string $value = '', string $cache_key = '' )
Adds the plugin version information to the database.
On This Page
Parameters Parameters
- $value
-
(string) (Optional)
Default value: ''
- $cache_key
-
(string) (Optional)
Default value: ''
Source Source
File: includes/addon/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' => wp_json_encode( $value ),
);
update_option( $cache_key, $data, false );
}
Expand full source codeCollapse full source codeView on Github