WC_Helper_Options::update() public WC 1.0
Update an option by key
All helper options are grouped in a single options entry. This method is not thread-safe, use with caution.
{} Это метод класса: WC_Helper_Options{}
Хуков нет.
Возвращает
true/false. True if the option has been updated.
Использование
$result = WC_Helper_Options::update( $key, $value );
- $key(строка) (обязательный)
- The key to update.
- $value(разное) (обязательный)
- The new option value.
Код WC_Helper_Options::update() WC Helper Options::update WC 5.0.0
public static function update( $key, $value ) {
$options = get_option( self::$option_name, array() );
$options[ $key ] = $value;
return update_option( self::$option_name, $options, true );
}