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.


Top ↑

Return Return

(bool) True if the option has been updated.


Top ↑

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 );
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.