Automattic\WooCommerce\Internal\Admin\BlockTemplates
AbstractBlock::set_attribute
Set a block attribute value without replacing the entire attributes object.
Method of the class: AbstractBlock{}
No Hooks.
Returns
null. Nothing (null).
Usage
$AbstractBlock = new AbstractBlock(); $AbstractBlock->set_attribute( $key, $value );
- $key(string) (required)
- The attribute key.
- $value(mixed) (required)
- The attribute value.
AbstractBlock::set_attribute() AbstractBlock::set attribute code WC 10.8.1
public function set_attribute( string $key, $value ) {
$this->attributes[ $key ] = $value;
}