WC_Helper_Options::update( string $key, mixed $value )
Update an option by key
Description Description
All helper options are grouped in a single options entry. This method is not thread-safe, use with caution.
Parameters Parameters
- $key
-
(Required) The key to update.
- $value
-
(Required) The new option value.
Return Return
(bool) True if the option has been updated.
Source Source
File: includes/admin/helper/class-wc-helper-options.php
public static function update( $key, $value ) { $options = get_option( self::$option_name, array() ); $options[ $key ] = $value; return update_option( self::$option_name, $options, true ); }