From f32011e2d3ea01d3198fd8cb208ddab8d2148d27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Albert=20Juh=C3=A9=20Lluveras?= Date: Tue, 26 Nov 2019 06:32:15 +0100 Subject: [PATCH] Fix invalid attributes error in some blocks (https://github.com/woocommerce/woocommerce-blocks/pull/1254) --- plugins/woocommerce-blocks/src/BlockTypes/HandpickedProducts.php | 1 + plugins/woocommerce-blocks/src/BlockTypes/ProductTag.php | 1 + .../woocommerce-blocks/src/BlockTypes/ProductsByAttribute.php | 1 + 3 files changed, 3 insertions(+) diff --git a/plugins/woocommerce-blocks/src/BlockTypes/HandpickedProducts.php b/plugins/woocommerce-blocks/src/BlockTypes/HandpickedProducts.php index 694287cdbdf..0906fede5e5 100644 --- a/plugins/woocommerce-blocks/src/BlockTypes/HandpickedProducts.php +++ b/plugins/woocommerce-blocks/src/BlockTypes/HandpickedProducts.php @@ -64,6 +64,7 @@ class HandpickedProducts extends AbstractProductGrid { 'orderby' => $this->get_schema_orderby(), 'products' => $this->get_schema_list_ids(), 'contentVisibility' => $this->get_schema_content_visibility(), + 'isPreview' => $this->get_schema_boolean( false ), ); } } diff --git a/plugins/woocommerce-blocks/src/BlockTypes/ProductTag.php b/plugins/woocommerce-blocks/src/BlockTypes/ProductTag.php index a5d688746de..4cd882521e9 100644 --- a/plugins/woocommerce-blocks/src/BlockTypes/ProductTag.php +++ b/plugins/woocommerce-blocks/src/BlockTypes/ProductTag.php @@ -55,6 +55,7 @@ class ProductTag extends AbstractProductGrid { 'type' => 'string', 'default' => 'any', ), + 'isPreview' => $this->get_schema_boolean( false ), ); } } diff --git a/plugins/woocommerce-blocks/src/BlockTypes/ProductsByAttribute.php b/plugins/woocommerce-blocks/src/BlockTypes/ProductsByAttribute.php index 8ccf4c7c85c..2ca58458842 100644 --- a/plugins/woocommerce-blocks/src/BlockTypes/ProductsByAttribute.php +++ b/plugins/woocommerce-blocks/src/BlockTypes/ProductsByAttribute.php @@ -74,6 +74,7 @@ class ProductsByAttribute extends AbstractProductGrid { 'editMode' => $this->get_schema_boolean( true ), 'orderby' => $this->get_schema_orderby(), 'rows' => $this->get_schema_number( wc_get_theme_support( 'product_blocks::default_rows', 1 ) ), + 'isPreview' => $this->get_schema_boolean( false ), ); } }