From f9b811263d7fec43d341129359e3509695925ca8 Mon Sep 17 00:00:00 2001 From: Pierre Gauthier Date: Thu, 2 Mar 2023 10:14:25 +0100 Subject: [PATCH] [Virtual Category] #1203860 - Unset virtual category root before setting it --- .../Model/VirtualCategory/Root.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/module-elasticsuite-virtual-category/Model/VirtualCategory/Root.php b/src/module-elasticsuite-virtual-category/Model/VirtualCategory/Root.php index 513bfad40..8134fe2bf 100644 --- a/src/module-elasticsuite-virtual-category/Model/VirtualCategory/Root.php +++ b/src/module-elasticsuite-virtual-category/Model/VirtualCategory/Root.php @@ -76,6 +76,7 @@ public function __construct( */ public function setAppliedRootCategory(CategoryInterface $category) { + $this->coreRegistry->unregister('applied_virtual_root_category'); $this->coreRegistry->register('applied_virtual_root_category', $category); return $this;