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

Disable compatibility layer #8507

Merged
merged 1 commit into from
Feb 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions src/BlockTemplatesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
namespace Automattic\WooCommerce\Blocks;

use Automattic\WooCommerce\Blocks\Domain\Package;
use Automattic\WooCommerce\Blocks\Templates\BlockTemplatesCompatibility;
use Automattic\WooCommerce\Blocks\Templates\ProductAttributeTemplate;
use Automattic\WooCommerce\Blocks\Utils\BlockTemplateUtils;

Expand Down Expand Up @@ -324,14 +323,6 @@ function( $template ) {
$template->description = BlockTemplateUtils::get_block_template_description( $template->slug );
}

if ( 'single-product' === $template->slug ) {
if ( ! is_admin() ) {
$new_content = BlockTemplatesCompatibility::wrap_single_product_template( $template->content );
$template->content = $new_content;
}
return $template;
}

return $template;
},
$query_result
Expand Down
8 changes: 0 additions & 8 deletions src/Domain/Bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
use Automattic\WooCommerce\Blocks\Payments\PaymentMethodRegistry;
use Automattic\WooCommerce\Blocks\Registry\Container;
use Automattic\WooCommerce\Blocks\Templates\ClassicTemplatesCompatibility;
use Automattic\WooCommerce\Blocks\Templates\BlockTemplatesCompatibility;
use Automattic\WooCommerce\Blocks\Templates\ProductAttributeTemplate;
use Automattic\WooCommerce\Blocks\Templates\ProductSearchResultsTemplate;
use Automattic\WooCommerce\StoreApi\RoutesController;
Expand Down Expand Up @@ -128,7 +127,6 @@ function() {
$this->container->get( ProductSearchResultsTemplate::class );
$this->container->get( ProductAttributeTemplate::class );
$this->container->get( ClassicTemplatesCompatibility::class );
$this->container->get( BlockTemplatesCompatibility::class );
$this->container->get( BlockPatterns::class );
$this->container->get( PaymentsApi::class );
$this->container->get( ShippingController::class )->init();
Expand Down Expand Up @@ -274,12 +272,6 @@ function ( Container $container ) {
return new ClassicTemplatesCompatibility( $asset_data_registry );
}
);
$this->container->register(
BlockTemplatesCompatibility::class,
function () {
return new BlockTemplatesCompatibility();
}
);
$this->container->register(
DraftOrders::class,
function( Container $container ) {
Expand Down