Skip to content
This repository was archived by the owner on Feb 23, 2024. It is now read-only.

Commit 04c3005

Browse files
authored
disable compatibilty layer (#8507)
1 parent a4971ed commit 04c3005

File tree

2 files changed

+0
-17
lines changed

2 files changed

+0
-17
lines changed

src/BlockTemplatesController.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
namespace Automattic\WooCommerce\Blocks;
33

44
use Automattic\WooCommerce\Blocks\Domain\Package;
5-
use Automattic\WooCommerce\Blocks\Templates\BlockTemplatesCompatibility;
65
use Automattic\WooCommerce\Blocks\Templates\ProductAttributeTemplate;
76
use Automattic\WooCommerce\Blocks\Utils\BlockTemplateUtils;
87

@@ -324,14 +323,6 @@ function( $template ) {
324323
$template->description = BlockTemplateUtils::get_block_template_description( $template->slug );
325324
}
326325

327-
if ( 'single-product' === $template->slug ) {
328-
if ( ! is_admin() ) {
329-
$new_content = BlockTemplatesCompatibility::wrap_single_product_template( $template->content );
330-
$template->content = $new_content;
331-
}
332-
return $template;
333-
}
334-
335326
return $template;
336327
},
337328
$query_result

src/Domain/Bootstrap.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
use Automattic\WooCommerce\Blocks\Payments\PaymentMethodRegistry;
2323
use Automattic\WooCommerce\Blocks\Registry\Container;
2424
use Automattic\WooCommerce\Blocks\Templates\ClassicTemplatesCompatibility;
25-
use Automattic\WooCommerce\Blocks\Templates\BlockTemplatesCompatibility;
2625
use Automattic\WooCommerce\Blocks\Templates\ProductAttributeTemplate;
2726
use Automattic\WooCommerce\Blocks\Templates\ProductSearchResultsTemplate;
2827
use Automattic\WooCommerce\StoreApi\RoutesController;
@@ -128,7 +127,6 @@ function() {
128127
$this->container->get( ProductSearchResultsTemplate::class );
129128
$this->container->get( ProductAttributeTemplate::class );
130129
$this->container->get( ClassicTemplatesCompatibility::class );
131-
$this->container->get( BlockTemplatesCompatibility::class );
132130
$this->container->get( BlockPatterns::class );
133131
$this->container->get( PaymentsApi::class );
134132
$this->container->get( ShippingController::class )->init();
@@ -274,12 +272,6 @@ function ( Container $container ) {
274272
return new ClassicTemplatesCompatibility( $asset_data_registry );
275273
}
276274
);
277-
$this->container->register(
278-
BlockTemplatesCompatibility::class,
279-
function () {
280-
return new BlockTemplatesCompatibility();
281-
}
282-
);
283275
$this->container->register(
284276
DraftOrders::class,
285277
function( Container $container ) {

0 commit comments

Comments
 (0)