diff --git a/plugins/woocommerce/changelog/49564-hide-filters-overlay b/plugins/woocommerce/changelog/49564-hide-filters-overlay new file mode 100644 index 00000000000..9d4e16e02e3 --- /dev/null +++ b/plugins/woocommerce/changelog/49564-hide-filters-overlay @@ -0,0 +1,4 @@ +Significance: patch +Type: dev + +Hide product filters overlay template part experimental feature from public release \ No newline at end of file diff --git a/plugins/woocommerce/src/Blocks/BlockTemplatesRegistry.php b/plugins/woocommerce/src/Blocks/BlockTemplatesRegistry.php index b9bb10582b3..38115b822b7 100644 --- a/plugins/woocommerce/src/Blocks/BlockTemplatesRegistry.php +++ b/plugins/woocommerce/src/Blocks/BlockTemplatesRegistry.php @@ -59,10 +59,13 @@ class BlockTemplatesRegistry { } if ( BlockTemplateUtils::supports_block_templates( 'wp_template_part' ) ) { $template_parts = array( - MiniCartTemplate::SLUG => new MiniCartTemplate(), - CheckoutHeaderTemplate::SLUG => new CheckoutHeaderTemplate(), - ProductFiltersOverlayTemplate::SLUG => new ProductFiltersOverlayTemplate(), + MiniCartTemplate::SLUG => new MiniCartTemplate(), + CheckoutHeaderTemplate::SLUG => new CheckoutHeaderTemplate(), ); + + if ( Features::is_enabled( 'experimental-blocks' ) ) { + $template_parts[ ProductFiltersOverlayTemplate::SLUG ] = new ProductFiltersOverlayTemplate(); + } } else { $template_parts = array(); } diff --git a/plugins/woocommerce/src/Blocks/Utils/BlockTemplateUtils.php b/plugins/woocommerce/src/Blocks/Utils/BlockTemplateUtils.php index c47b10aa1c2..5819d8a0d75 100644 --- a/plugins/woocommerce/src/Blocks/Utils/BlockTemplateUtils.php +++ b/plugins/woocommerce/src/Blocks/Utils/BlockTemplateUtils.php @@ -316,9 +316,12 @@ class BlockTemplateUtils { $wp_template_part_filenames = array( 'checkout-header.html', 'mini-cart.html', - 'product-filters-overlay.html', ); + if ( Features::is_enabled( 'experimental-blocks' ) ) { + $wp_template_part_filenames[] = 'product-filters-overlay.html'; + } + /* * This may return the blockified directory for wp_templates. * At the moment every template file has a corresponding blockified file.