WordPress at Your Fingertips
function is not described

WC_Product_Attribute::offsetSet() public WC 1.0

OffsetSet.

{} It's a method of the class: WC_Product_Attribute{}

No Hooks.

Return

null. Nothing.

Usage

$WC_Product_Attribute = new WC_Product_Attribute();
$WC_Product_Attribute->offsetSet( $offset, $value );
$offset(string) (required)
Offset.
$value(mixed) (required)
Value.

Code of WC_Product_Attribute::offsetSet() WC 5.6.0

public function offsetSet( $offset, $value ) {
	switch ( $offset ) {
		case 'is_variation':
			$this->set_variation( $value );
			break;
		case 'is_visible':
			$this->set_visible( $value );
			break;
		case 'value':
			$this->set_options( $value );
			break;
		default:
			if ( is_callable( array( $this, "set_$offset" ) ) ) {
				return $this->{"set_$offset"}( $value );
			}
			break;
	}
}