Automattic\WooCommerce\Internal\Admin\RemoteFreeExtensions
ProcessCoreProfilerPluginInstallOptions::add_option
Updates an option in the WordPress database.
Method of the class: ProcessCoreProfilerPluginInstallOptions{}
No Hooks.
Returns
null. Nothing (null).
Usage
// protected - for code of main (parent) or child class $result = $this->add_option( $name, $value, $autoload );
- $name(string) (required)
- Option name.
- $value(mixed) (required)
- Option value.
- $autoload(string)
- Autoload option.
Default:null
ProcessCoreProfilerPluginInstallOptions::add_option() ProcessCoreProfilerPluginInstallOptions::add option code WC 10.5.0
protected function add_option( string $name, $value, $autoload = null ) {
if ( in_array( $name, self::DISALLOWED_OPTIONS, true ) ) {
$this->logger && $this->logger->error( 'Disallowed option: ' . $name );
return;
}
add_option( $name, $value, '', $autoload );
}