From 25c32dff45376dcb05d9c07ad0d545a9c211e675 Mon Sep 17 00:00:00 2001 From: Darren Ethier Date: Mon, 16 Dec 2019 08:27:17 -0500 Subject: [PATCH] make sure we only allow one cart/checkout block per page/post (https://github.com/woocommerce/woocommerce-blocks/pull/1384) --- .../assets/js/blocks/cart-checkout/cart/index.js | 1 + .../assets/js/blocks/cart-checkout/checkout/index.js | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/woocommerce-blocks/assets/js/blocks/cart-checkout/cart/index.js b/plugins/woocommerce-blocks/assets/js/blocks/cart-checkout/cart/index.js index 8b3bd1ff29c..957db0a60d2 100644 --- a/plugins/woocommerce-blocks/assets/js/blocks/cart-checkout/cart/index.js +++ b/plugins/woocommerce-blocks/assets/js/blocks/cart-checkout/cart/index.js @@ -28,6 +28,7 @@ registerBlockType( 'woocommerce/cart', { supports: { align: [ 'wide', 'full' ], html: false, + multiple: false, }, example, attributes: {}, diff --git a/plugins/woocommerce-blocks/assets/js/blocks/cart-checkout/checkout/index.js b/plugins/woocommerce-blocks/assets/js/blocks/cart-checkout/checkout/index.js index ec44c7c9583..6012b772efc 100644 --- a/plugins/woocommerce-blocks/assets/js/blocks/cart-checkout/checkout/index.js +++ b/plugins/woocommerce-blocks/assets/js/blocks/cart-checkout/checkout/index.js @@ -25,7 +25,11 @@ registerBlockType( 'woocommerce/checkout', { 'Display the checkout experience for customers.', 'woo-gutenberg-products-block' ), - supports: {}, + supports: { + align: [ 'wide', 'full' ], + html: false, + multiple: false, + }, example, attributes: { /**