Put product filters overlay template part behind feature flag (#49564)
* Put product filters overlay template part behind feature flag * Add changefile(s) from automation for the following project(s): woocommerce --------- Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
parent
1c981034a7
commit
a145575b01
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
|
||||
Hide product filters overlay template part experimental feature from public release
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue