disable compatibilty layer (https://github.com/woocommerce/woocommerce-blocks/pull/8507)
This commit is contained in:
parent
bddea32747
commit
17171910a9
|
@ -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;
|
||||
|
||||
|
@ -324,14 +323,6 @@ class BlockTemplatesController {
|
|||
$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
|
||||
|
|
|
@ -22,7 +22,6 @@ use Automattic\WooCommerce\Blocks\Payments\Integrations\PayPal;
|
|||
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;
|
||||
|
@ -128,7 +127,6 @@ class Bootstrap {
|
|||
$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();
|
||||
|
@ -274,12 +272,6 @@ class Bootstrap {
|
|||
return new ClassicTemplatesCompatibility( $asset_data_registry );
|
||||
}
|
||||
);
|
||||
$this->container->register(
|
||||
BlockTemplatesCompatibility::class,
|
||||
function () {
|
||||
return new BlockTemplatesCompatibility();
|
||||
}
|
||||
);
|
||||
$this->container->register(
|
||||
DraftOrders::class,
|
||||
function( Container $container ) {
|
||||
|
|
Loading…
Reference in New Issue