WordPress at Your Fingertips
function is not described

WC_Product_Attribute::offsetGet() public WC 1.0

OffsetGet.

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

No Hooks.

Return

Mixed.

Usage

$WC_Product_Attribute = new WC_Product_Attribute();
$WC_Product_Attribute->offsetGet( $offset );
$offset(string) (required)
Offset.

Code of WC_Product_Attribute::offsetGet() WC 5.6.0

public function offsetGet( $offset ) {
	switch ( $offset ) {
		case 'is_variation':
			return $this->get_variation() ? 1 : 0;
		case 'is_visible':
			return $this->get_visible() ? 1 : 0;
		case 'is_taxonomy':
			return $this->is_taxonomy() ? 1 : 0;
		case 'value':
			return $this->is_taxonomy() ? '' : wc_implode_text_attributes( $this->get_options() );
		default:
			if ( is_callable( array( $this, "get_$offset" ) ) ) {
				return $this->{"get_$offset"}();
			}
			break;
	}
	return '';
}