WC_Product_Attribute::set_extra_datapublicWC 10.6.0

Set extra data by key.

Method of the class: WC_Product_Attribute{}

No Hooks.

Returns

null. Nothing (null).

Usage

$WC_Product_Attribute = new WC_Product_Attribute();
$WC_Product_Attribute->set_extra_data( $key, $value ): void;
$key(string) (required)
Extra data key.
$value(mixed) (required)
Extra data value.

Changelog

Since 10.6.0 Introduced.

WC_Product_Attribute::set_extra_data() code WC 10.8.1

public function set_extra_data( string $key, $value ): void {
	$this->extra_data[ $key ] = $value;
}