Automattic\WooCommerce\Internal\Admin\BlockTemplates
AbstractBlock::is_detached
Check if the block is detached from its parent block container or the template it belongs to.
Method of the class: AbstractBlock{}
No Hooks.
Returns
true|false. True if the block is detached from its parent block container or the template it belongs to.
Usage
$AbstractBlock = new AbstractBlock(); $AbstractBlock->is_detached(): bool;
AbstractBlock::is_detached() AbstractBlock::is detached code WC 10.3.6
public function is_detached(): bool {
$is_in_parent = $this->parent->get_block( $this->id ) === $this;
$is_in_root_template = $this->get_root_template()->get_block( $this->id ) === $this;
return ! ( $is_in_parent && $is_in_root_template );
}