From e03acdf662837837a217e52e0a128b3073e7dea5 Mon Sep 17 00:00:00 2001 From: Matt Sherman Date: Fri, 15 Sep 2023 12:54:16 -0400 Subject: [PATCH] Simplify logic in is_detached() --- .../src/Internal/Admin/BlockTemplates/AbstractBlock.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/woocommerce/src/Internal/Admin/BlockTemplates/AbstractBlock.php b/plugins/woocommerce/src/Internal/Admin/BlockTemplates/AbstractBlock.php index 2af5c74c0c1..31696720603 100644 --- a/plugins/woocommerce/src/Internal/Admin/BlockTemplates/AbstractBlock.php +++ b/plugins/woocommerce/src/Internal/Admin/BlockTemplates/AbstractBlock.php @@ -189,7 +189,7 @@ class AbstractBlock implements BlockInterface { $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; + return ! ( $is_in_parent && $is_in_root_template ); } /** * Get the block configuration as a formatted template.