Update all blocks to V3 (#48720)

* Update all blocks to V3

* remove explicit version set in shared config blocks

* update styling for Cart/Checkout in iframe

* test: fix block e2e tests

* test: fix attribute filter e2e tests

* test: fix product collection e2e tests

* test: fix product on sale e2e test

* test: fix rating filter e2e tests

* test: fix review e2e tests

* test: fix stock e2e tests

* test: fix preview button test

* fix: product on sale wrapper

* test: fix insertBlockByShortcut in iframe

* test: fix core e2e tests

* chore: changelog

* test: typo

* test: update PC e2e tests

* add test to make sure iframe canvas is loaded

* fix syntax error

* Update plugins/woocommerce-blocks/tests/e2e/tests/basic.block_theme.spec.ts

Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>

---------

Co-authored-by: Tung Du <dinhtungdu@gmail.com>
Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>
This commit is contained in:
Seghir Nadir 2024-08-20 12:14:11 +02:00 committed by GitHub
parent d7682504d9
commit 2a406c7e8a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
209 changed files with 1414 additions and 699 deletions

View File

@ -0,0 +1,4 @@
Significance: minor
Type: update
Update all blocks to use API Version 3.

View File

@ -1,5 +1,5 @@
{ {
"apiVersion": 2, "apiVersion": 3,
"name": "{{slug}}/checkout-newsletter-subscription", "name": "{{slug}}/checkout-newsletter-subscription",
"version": "2.0.0", "version": "2.0.0",
"title": "Newsletter Subscription!", "title": "Newsletter Subscription!",

View File

@ -0,0 +1,4 @@
Significance: minor
Type: update
Update all blocks to use API Version 3.

View File

@ -1,11 +1,15 @@
{ {
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2, "apiVersion": 3,
"name": "woocommerce/product-checkbox-field", "name": "woocommerce/product-checkbox-field",
"title": "Product checkbox control", "title": "Product checkbox control",
"category": "woocommerce", "category": "woocommerce",
"description": "A reusable checkbox for the product editor.", "description": "A reusable checkbox for the product editor.",
"keywords": [ "products", "checkbox", "input" ], "keywords": [
"products",
"checkbox",
"input"
],
"textdomain": "default", "textdomain": "default",
"attributes": { "attributes": {
"title": { "title": {
@ -38,5 +42,7 @@
"__experimentalToolbar": false "__experimentalToolbar": false
}, },
"editorStyle": "file:./editor.css", "editorStyle": "file:./editor.css",
"usesContext": [ "postType" ] "usesContext": [
"postType"
]
} }

View File

@ -1,6 +1,6 @@
{ {
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2, "apiVersion": 3,
"name": "woocommerce/product-collapsible", "name": "woocommerce/product-collapsible",
"title": "Collapsible", "title": "Collapsible",
"category": "widgets", "category": "widgets",

View File

@ -1,6 +1,6 @@
{ {
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2, "apiVersion": 3,
"name": "woocommerce/conditional", "name": "woocommerce/conditional",
"title": "Conditional", "title": "Conditional",
"category": "widgets", "category": "widgets",

View File

@ -1,11 +1,15 @@
{ {
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2, "apiVersion": 3,
"name": "woocommerce/product-linked-list-field", "name": "woocommerce/product-linked-list-field",
"title": "Linked product list", "title": "Linked product list",
"category": "widgets", "category": "widgets",
"description": "The linked product list.", "description": "The linked product list.",
"keywords": [ "products", "linked", "list" ], "keywords": [
"products",
"linked",
"list"
],
"textdomain": "default", "textdomain": "default",
"attributes": { "attributes": {
"property": { "property": {
@ -27,5 +31,8 @@
"__experimentalToolbar": false "__experimentalToolbar": false
}, },
"editorStyle": "file:./editor.css", "editorStyle": "file:./editor.css",
"usesContext": [ "postType", "isInSelectedTab" ] "usesContext": [
"postType",
"isInSelectedTab"
]
} }

View File

@ -1,11 +1,15 @@
{ {
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2, "apiVersion": 3,
"name": "woocommerce/product-number-field", "name": "woocommerce/product-number-field",
"title": "Product number control", "title": "Product number control",
"category": "woocommerce", "category": "woocommerce",
"description": "A reusable number field for the product editor.", "description": "A reusable number field for the product editor.",
"keywords": [ "products", "number", "input" ], "keywords": [
"products",
"number",
"input"
],
"textdomain": "default", "textdomain": "default",
"attributes": { "attributes": {
"label": { "label": {

View File

@ -1,11 +1,14 @@
{ {
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2, "apiVersion": 3,
"name": "woocommerce/product-pricing-field", "name": "woocommerce/product-pricing-field",
"description": "A product price block with currency display.", "description": "A product price block with currency display.",
"title": "Product pricing", "title": "Product pricing",
"category": "widgets", "category": "widgets",
"keywords": [ "products", "price" ], "keywords": [
"products",
"price"
],
"textdomain": "default", "textdomain": "default",
"attributes": { "attributes": {
"property": { "property": {
@ -32,5 +35,7 @@
"__experimentalToolbar": false "__experimentalToolbar": false
}, },
"editorStyle": "file:./editor.css", "editorStyle": "file:./editor.css",
"usesContext": [ "postType" ] "usesContext": [
"postType"
]
} }

View File

@ -1,11 +1,15 @@
{ {
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2, "apiVersion": 3,
"name": "woocommerce/product-radio-field", "name": "woocommerce/product-radio-field",
"title": "Product radio control", "title": "Product radio control",
"category": "woocommerce", "category": "woocommerce",
"description": "The product radio.", "description": "The product radio.",
"keywords": [ "products", "radio", "input" ], "keywords": [
"products",
"radio",
"input"
],
"textdomain": "default", "textdomain": "default",
"attributes": { "attributes": {
"title": { "title": {
@ -39,5 +43,7 @@
"lock": false, "lock": false,
"__experimentalToolbar": false "__experimentalToolbar": false
}, },
"usesContext": [ "postType" ] "usesContext": [
"postType"
]
} }

View File

@ -1,11 +1,15 @@
{ {
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2, "apiVersion": 3,
"name": "woocommerce/product-section-description", "name": "woocommerce/product-section-description",
"title": "Product section description", "title": "Product section description",
"category": "woocommerce", "category": "woocommerce",
"description": "The product section description.", "description": "The product section description.",
"keywords": [ "products", "section", "description" ], "keywords": [
"products",
"section",
"description"
],
"textdomain": "default", "textdomain": "default",
"attributes": { "attributes": {
"content": { "content": {

View File

@ -1,11 +1,15 @@
{ {
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2, "apiVersion": 3,
"name": "woocommerce/product-section", "name": "woocommerce/product-section",
"title": "Product section", "title": "Product section",
"category": "woocommerce", "category": "woocommerce",
"description": "The product section.", "description": "The product section.",
"keywords": [ "products", "section", "group" ], "keywords": [
"products",
"section",
"group"
],
"textdomain": "default", "textdomain": "default",
"attributes": { "attributes": {
"title": { "title": {
@ -17,7 +21,11 @@
}, },
"blockGap": { "blockGap": {
"type": "string", "type": "string",
"enum": [ "unit-20", "unit-30", "unit-40" ], "enum": [
"unit-20",
"unit-30",
"unit-40"
],
"default": "unit-20" "default": "unit-20"
} }
}, },

View File

@ -1,11 +1,14 @@
{ {
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2, "apiVersion": 3,
"name": "woocommerce/product-select-field", "name": "woocommerce/product-select-field",
"title": "Product select field", "title": "Product select field",
"category": "woocommerce", "category": "woocommerce",
"description": "A select field for use in the product editor.", "description": "A select field for use in the product editor.",
"keywords": [ "products", "select" ], "keywords": [
"products",
"select"
],
"textdomain": "default", "textdomain": "default",
"attributes": { "attributes": {
"label": { "label": {
@ -60,5 +63,7 @@
"lock": false, "lock": false,
"__experimentalToolbar": false "__experimentalToolbar": false
}, },
"usesContext": [ "postType" ] "usesContext": [
"postType"
]
} }

View File

@ -1,11 +1,15 @@
{ {
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2, "apiVersion": 3,
"name": "woocommerce/product-subsection-description", "name": "woocommerce/product-subsection-description",
"title": "Product subsection description", "title": "Product subsection description",
"category": "woocommerce", "category": "woocommerce",
"description": "The product subsection description.", "description": "The product subsection description.",
"keywords": [ "products", "subsection", "description" ], "keywords": [
"products",
"subsection",
"description"
],
"textdomain": "default", "textdomain": "default",
"attributes": { "attributes": {
"content": { "content": {

View File

@ -1,11 +1,15 @@
{ {
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2, "apiVersion": 3,
"name": "woocommerce/product-subsection", "name": "woocommerce/product-subsection",
"title": "Product subsection", "title": "Product subsection",
"category": "woocommerce", "category": "woocommerce",
"description": "The product subsection.", "description": "The product subsection.",
"keywords": [ "products", "subsection", "group" ], "keywords": [
"products",
"subsection",
"group"
],
"textdomain": "default", "textdomain": "default",
"attributes": { "attributes": {
"title": { "title": {
@ -17,7 +21,11 @@
}, },
"blockGap": { "blockGap": {
"type": "string", "type": "string",
"enum": [ "unit-20", "unit-30", "unit-40" ], "enum": [
"unit-20",
"unit-30",
"unit-40"
],
"default": "unit-20" "default": "unit-20"
} }
}, },

View File

@ -1,11 +1,15 @@
{ {
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2, "apiVersion": 3,
"name": "woocommerce/product-tab", "name": "woocommerce/product-tab",
"title": "Product tab", "title": "Product tab",
"category": "woocommerce", "category": "woocommerce",
"description": "The product tab.", "description": "The product tab.",
"keywords": [ "products", "tab", "group" ], "keywords": [
"products",
"tab",
"group"
],
"textdomain": "default", "textdomain": "default",
"attributes": { "attributes": {
"id": { "id": {
@ -27,6 +31,8 @@
"providesContext": { "providesContext": {
"isInSelectedTab": "isSelected" "isInSelectedTab": "isSelected"
}, },
"usesContext": [ "selectedTab" ], "usesContext": [
"selectedTab"
],
"editorStyle": "file:./editor.css" "editorStyle": "file:./editor.css"
} }

View File

@ -1,11 +1,13 @@
{ {
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2, "apiVersion": 3,
"name": "woocommerce/product-taxonomy-field", "name": "woocommerce/product-taxonomy-field",
"title": "Taxonomy", "title": "Taxonomy",
"category": "widgets", "category": "widgets",
"description": "A block that displays a taxonomy field, allowing searching, selection, and creation of new items", "description": "A block that displays a taxonomy field, allowing searching, selection, and creation of new items",
"keywords": [ "taxonomy" ], "keywords": [
"taxonomy"
],
"textdomain": "default", "textdomain": "default",
"attributes": { "attributes": {
"slug": { "slug": {
@ -51,5 +53,8 @@
"__experimentalToolbar": false "__experimentalToolbar": false
}, },
"editorStyle": "file:./editor.css", "editorStyle": "file:./editor.css",
"usesContext": [ "postType", "isInSelectedTab" ] "usesContext": [
"postType",
"isInSelectedTab"
]
} }

View File

@ -1,11 +1,14 @@
{ {
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2, "apiVersion": 3,
"name": "woocommerce/product-text-area-field", "name": "woocommerce/product-text-area-field",
"title": "Product textarea block", "title": "Product textarea block",
"category": "woocommerce", "category": "woocommerce",
"description": "A text-area field for use in the product editor.", "description": "A text-area field for use in the product editor.",
"keywords": [ "textarea", "rich-text" ], "keywords": [
"textarea",
"rich-text"
],
"textdomain": "default", "textdomain": "default",
"attributes": { "attributes": {
"property": { "property": {
@ -32,11 +35,19 @@
}, },
"align": { "align": {
"type": "string", "type": "string",
"enum": [ "left", "center", "right", "justify" ] "enum": [
"left",
"center",
"right",
"justify"
]
}, },
"mode": { "mode": {
"type": "string", "type": "string",
"enum": [ "plain-text", "rich-text" ], "enum": [
"plain-text",
"rich-text"
],
"default": "rich-text" "default": "rich-text"
}, },
"allowedFormats": { "allowedFormats": {
@ -56,7 +67,10 @@
}, },
"direction": { "direction": {
"type": "string", "type": "string",
"enum": [ "ltr", "rtl" ] "enum": [
"ltr",
"rtl"
]
} }
}, },
"supports": { "supports": {

View File

@ -1,11 +1,14 @@
{ {
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2, "apiVersion": 3,
"name": "woocommerce/product-text-field", "name": "woocommerce/product-text-field",
"title": "Product text field", "title": "Product text field",
"category": "woocommerce", "category": "woocommerce",
"description": "A text field for use in the product editor.", "description": "A text field for use in the product editor.",
"keywords": [ "products", "text" ], "keywords": [
"products",
"text"
],
"textdomain": "default", "textdomain": "default",
"attributes": { "attributes": {
"label": { "label": {
@ -59,5 +62,7 @@
"__experimentalToolbar": false "__experimentalToolbar": false
}, },
"editorStyle": "file:./editor.css", "editorStyle": "file:./editor.css",
"usesContext": [ "postType" ] "usesContext": [
"postType"
]
} }

View File

@ -1,11 +1,15 @@
{ {
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2, "apiVersion": 3,
"name": "woocommerce/product-toggle-field", "name": "woocommerce/product-toggle-field",
"title": "Product toggle control", "title": "Product toggle control",
"category": "woocommerce", "category": "woocommerce",
"description": "The product toggle.", "description": "The product toggle.",
"keywords": [ "products", "radio", "input" ], "keywords": [
"products",
"radio",
"input"
],
"textdomain": "default", "textdomain": "default",
"attributes": { "attributes": {
"label": { "label": {
@ -48,5 +52,7 @@
"lock": false, "lock": false,
"__experimentalToolbar": false "__experimentalToolbar": false
}, },
"usesContext": [ "postType" ] "usesContext": [
"postType"
]
} }

View File

@ -1,11 +1,14 @@
{ {
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2, "apiVersion": 3,
"name": "woocommerce/product-attributes-field", "name": "woocommerce/product-attributes-field",
"title": "Product attributes", "title": "Product attributes",
"category": "widgets", "category": "widgets",
"description": "The product attributes.", "description": "The product attributes.",
"keywords": [ "products", "attributes" ], "keywords": [
"products",
"attributes"
],
"textdomain": "default", "textdomain": "default",
"attributes": { "attributes": {
"name": { "name": {
@ -22,6 +25,8 @@
"lock": false, "lock": false,
"__experimentalToolbar": false "__experimentalToolbar": false
}, },
"usesContext": [ "isInSelectedTab" ], "usesContext": [
"isInSelectedTab"
],
"editorStyle": "file:./editor.css" "editorStyle": "file:./editor.css"
} }

View File

@ -1,11 +1,14 @@
{ {
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2, "apiVersion": 3,
"name": "woocommerce/product-catalog-visibility-field", "name": "woocommerce/product-catalog-visibility-field",
"description": "A checkbox to manage the catalog visibility of the product.", "description": "A checkbox to manage the catalog visibility of the product.",
"title": "Product catalog visibility", "title": "Product catalog visibility",
"category": "widgets", "category": "widgets",
"keywords": [ "products", "catalog" ], "keywords": [
"products",
"catalog"
],
"textdomain": "default", "textdomain": "default",
"attributes": { "attributes": {
"label": { "label": {
@ -14,7 +17,12 @@
}, },
"visibility": { "visibility": {
"type": "string", "type": "string",
"enum": [ "visible", "catalog", "search", "hidden" ], "enum": [
"visible",
"catalog",
"search",
"hidden"
],
"default": "visible" "default": "visible"
} }
}, },

View File

@ -1,11 +1,15 @@
{ {
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2, "apiVersion": 3,
"name": "woocommerce/product-custom-fields-toggle-field", "name": "woocommerce/product-custom-fields-toggle-field",
"title": "Product custom fields toggle control", "title": "Product custom fields toggle control",
"category": "woocommerce", "category": "woocommerce",
"description": "The product custom fields toggle.", "description": "The product custom fields toggle.",
"keywords": [ "products", "custom", "fields" ], "keywords": [
"products",
"custom",
"fields"
],
"textdomain": "default", "textdomain": "default",
"attributes": { "attributes": {
"label": { "label": {

View File

@ -1,11 +1,15 @@
{ {
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2, "apiVersion": 3,
"name": "woocommerce/product-custom-fields", "name": "woocommerce/product-custom-fields",
"title": "Product custom fields control", "title": "Product custom fields control",
"category": "woocommerce", "category": "woocommerce",
"description": "The product custom fields.", "description": "The product custom fields.",
"keywords": [ "products", "custom", "fields" ], "keywords": [
"products",
"custom",
"fields"
],
"textdomain": "default", "textdomain": "default",
"attributes": { "attributes": {
"name": { "name": {

View File

@ -1,11 +1,14 @@
{ {
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2, "apiVersion": 3,
"name": "woocommerce/product-description-field", "name": "woocommerce/product-description-field",
"title": "Product description", "title": "Product description",
"category": "woocommerce", "category": "woocommerce",
"description": "The product description.", "description": "The product description.",
"keywords": [ "products", "description" ], "keywords": [
"products",
"description"
],
"textdomain": "default", "textdomain": "default",
"attributes": { "attributes": {
"__contentEditable": { "__contentEditable": {

View File

@ -1,11 +1,14 @@
{ {
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2, "apiVersion": 3,
"name": "woocommerce/product-downloads-field", "name": "woocommerce/product-downloads-field",
"title": "Product downloads", "title": "Product downloads",
"category": "widgets", "category": "widgets",
"description": "The product downloads.", "description": "The product downloads.",
"keywords": [ "products", "downloads" ], "keywords": [
"products",
"downloads"
],
"textdomain": "default", "textdomain": "default",
"attributes": { "attributes": {
"name": { "name": {
@ -23,5 +26,7 @@
"__experimentalToolbar": false "__experimentalToolbar": false
}, },
"editorStyle": "file:./editor.css", "editorStyle": "file:./editor.css",
"usesContext": [ "postType" ] "usesContext": [
"postType"
]
} }

View File

@ -1,11 +1,16 @@
{ {
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2, "apiVersion": 3,
"name": "woocommerce/product-images-field", "name": "woocommerce/product-images-field",
"title": "Product images", "title": "Product images",
"category": "widgets", "category": "widgets",
"description": "The product images.", "description": "The product images.",
"keywords": [ "products", "image", "images", "gallery" ], "keywords": [
"products",
"image",
"images",
"gallery"
],
"textdomain": "default", "textdomain": "default",
"attributes": { "attributes": {
"mediaId": { "mediaId": {
@ -38,5 +43,7 @@
"__experimentalToolbar": false "__experimentalToolbar": false
}, },
"editorStyle": "file:./editor.css", "editorStyle": "file:./editor.css",
"usesContext": [ "postType" ] "usesContext": [
"postType"
]
} }

View File

@ -1,11 +1,16 @@
{ {
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2, "apiVersion": 3,
"name": "woocommerce/product-inventory-email-field", "name": "woocommerce/product-inventory-email-field",
"title": "Stock level threshold", "title": "Stock level threshold",
"category": "widgets", "category": "widgets",
"description": "Stock management minimum quantity.", "description": "Stock management minimum quantity.",
"keywords": [ "products", "inventory", "email", "minimum" ], "keywords": [
"products",
"inventory",
"email",
"minimum"
],
"textdomain": "default", "textdomain": "default",
"attributes": { "attributes": {
"name": { "name": {

View File

@ -1,11 +1,15 @@
{ {
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2, "apiVersion": 3,
"name": "woocommerce/product-inventory-quantity-field", "name": "woocommerce/product-inventory-quantity-field",
"title": "Product inventory quantity available", "title": "Product inventory quantity available",
"category": "woocommerce", "category": "woocommerce",
"description": "The product available quantity.", "description": "The product available quantity.",
"keywords": [ "products", "quantity", "inventory" ], "keywords": [
"products",
"quantity",
"inventory"
],
"textdomain": "default", "textdomain": "default",
"attributes": { "attributes": {
"name": { "name": {
@ -22,5 +26,7 @@
"lock": false, "lock": false,
"__experimentalToolbar": false "__experimentalToolbar": false
}, },
"usesContext": [ "postType" ] "usesContext": [
"postType"
]
} }

View File

@ -1,11 +1,14 @@
{ {
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2, "apiVersion": 3,
"name": "woocommerce/product-sku-field", "name": "woocommerce/product-sku-field",
"title": "Product text control", "title": "Product text control",
"category": "woocommerce", "category": "woocommerce",
"description": "The product sku.", "description": "The product sku.",
"keywords": [ "products", "sku" ], "keywords": [
"products",
"sku"
],
"textdomain": "default", "textdomain": "default",
"attributes": { "attributes": {
"name": { "name": {
@ -27,5 +30,7 @@
"__experimentalToolbar": false "__experimentalToolbar": false
}, },
"editorStyle": "file:./editor.css", "editorStyle": "file:./editor.css",
"usesContext": [ "postType" ] "usesContext": [
"postType"
]
} }

View File

@ -1,11 +1,15 @@
{ {
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2, "apiVersion": 3,
"name": "woocommerce/product-name-field", "name": "woocommerce/product-name-field",
"title": "Product name", "title": "Product name",
"category": "widgets", "category": "widgets",
"description": "The product name.", "description": "The product name.",
"keywords": [ "products", "name", "title" ], "keywords": [
"products",
"name",
"title"
],
"textdomain": "default", "textdomain": "default",
"attributes": { "attributes": {
"name": { "name": {

View File

@ -1,11 +1,14 @@
{ {
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2, "apiVersion": 3,
"name": "woocommerce/product-single-variation-notice", "name": "woocommerce/product-single-variation-notice",
"title": "Notice", "title": "Notice",
"category": "woocommerce", "category": "woocommerce",
"description": "Notice description", "description": "Notice description",
"keywords": [ "products", "notice" ], "keywords": [
"products",
"notice"
],
"textdomain": "default", "textdomain": "default",
"attributes": { "attributes": {
"title": { "title": {

View File

@ -1,11 +1,14 @@
{ {
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2, "apiVersion": 3,
"name": "woocommerce/product-has-variations-notice", "name": "woocommerce/product-has-variations-notice",
"title": "Notice", "title": "Notice",
"category": "woocommerce", "category": "woocommerce",
"description": "Notice description", "description": "Notice description",
"keywords": [ "products", "notice" ], "keywords": [
"products",
"notice"
],
"textdomain": "default", "textdomain": "default",
"attributes": { "attributes": {
"title": { "title": {

View File

@ -1,11 +1,14 @@
{ {
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2, "apiVersion": 3,
"name": "woocommerce/product-password-field", "name": "woocommerce/product-password-field",
"description": "A checkbox and an input to type a password to view a product.", "description": "A checkbox and an input to type a password to view a product.",
"title": "Product password", "title": "Product password",
"category": "widgets", "category": "widgets",
"keywords": [ "products", "password" ], "keywords": [
"products",
"password"
],
"textdomain": "default", "textdomain": "default",
"attributes": { "attributes": {
"label": { "label": {

View File

@ -1,11 +1,15 @@
{ {
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2, "apiVersion": 3,
"name": "woocommerce/product-details-section-description", "name": "woocommerce/product-details-section-description",
"title": "Product details section description", "title": "Product details section description",
"category": "woocommerce", "category": "woocommerce",
"description": "The product details section description.", "description": "The product details section description.",
"keywords": [ "products", "section", "description" ], "keywords": [
"products",
"section",
"description"
],
"textdomain": "default", "textdomain": "default",
"attributes": { "attributes": {
"content": { "content": {

View File

@ -1,11 +1,13 @@
{ {
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2, "apiVersion": 3,
"name": "woocommerce/product-list-field", "name": "woocommerce/product-list-field",
"title": "Product list", "title": "Product list",
"category": "widgets", "category": "widgets",
"description": "The product list.", "description": "The product list.",
"keywords": [ "products" ], "keywords": [
"products"
],
"textdomain": "default", "textdomain": "default",
"attributes": { "attributes": {
"property": { "property": {
@ -23,5 +25,7 @@
"__experimentalToolbar": false "__experimentalToolbar": false
}, },
"editorStyle": "file:./editor.css", "editorStyle": "file:./editor.css",
"usesContext": [ "postType" ] "usesContext": [
"postType"
]
} }

View File

@ -1,11 +1,14 @@
{ {
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2, "apiVersion": 3,
"name": "woocommerce/product-regular-price-field", "name": "woocommerce/product-regular-price-field",
"description": "A product price block with currency display.", "description": "A product price block with currency display.",
"title": "Product regular price", "title": "Product regular price",
"category": "widgets", "category": "widgets",
"keywords": [ "products", "price" ], "keywords": [
"products",
"price"
],
"textdomain": "default", "textdomain": "default",
"attributes": { "attributes": {
"label": { "label": {
@ -36,6 +39,8 @@
"lock": false, "lock": false,
"__experimentalToolbar": false "__experimentalToolbar": false
}, },
"usesContext": [ "postType" ], "usesContext": [
"postType"
],
"editorStyle": "file:./editor.css" "editorStyle": "file:./editor.css"
} }

View File

@ -1,11 +1,14 @@
{ {
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2, "apiVersion": 3,
"name": "woocommerce/product-sale-price-field", "name": "woocommerce/product-sale-price-field",
"description": "A product price block with currency display.", "description": "A product price block with currency display.",
"title": "Product sale price", "title": "Product sale price",
"category": "widgets", "category": "widgets",
"keywords": [ "products", "price" ], "keywords": [
"products",
"price"
],
"textdomain": "default", "textdomain": "default",
"attributes": { "attributes": {
"label": { "label": {
@ -32,6 +35,8 @@
"lock": false, "lock": false,
"__experimentalToolbar": false "__experimentalToolbar": false
}, },
"usesContext": [ "postType" ], "usesContext": [
"postType"
],
"editorStyle": "file:./editor.css" "editorStyle": "file:./editor.css"
} }

View File

@ -1,11 +1,15 @@
{ {
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2, "apiVersion": 3,
"name": "woocommerce/product-schedule-sale-fields", "name": "woocommerce/product-schedule-sale-fields",
"title": "Product schedule sale fields", "title": "Product schedule sale fields",
"category": "woocommerce", "category": "woocommerce",
"description": "The product schedule sale fields.", "description": "The product schedule sale fields.",
"keywords": [ "products", "schedule", "sale" ], "keywords": [
"products",
"schedule",
"sale"
],
"textdomain": "default", "textdomain": "default",
"attributes": { "attributes": {
"name": { "name": {
@ -23,5 +27,7 @@
"__experimentalToolbar": false "__experimentalToolbar": false
}, },
"editorStyle": "file:./editor.css", "editorStyle": "file:./editor.css",
"usesContext": [ "postType" ] "usesContext": [
"postType"
]
} }

View File

@ -1,11 +1,15 @@
{ {
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2, "apiVersion": 3,
"name": "woocommerce/product-shipping-class-field", "name": "woocommerce/product-shipping-class-field",
"title": "Product shipping class field", "title": "Product shipping class field",
"category": "woocommerce", "category": "woocommerce",
"description": "The product shipping class field.", "description": "The product shipping class field.",
"keywords": [ "products", "shipping", "class" ], "keywords": [
"products",
"shipping",
"class"
],
"textdomain": "default", "textdomain": "default",
"attributes": { "attributes": {
"title": { "title": {
@ -26,5 +30,8 @@
"lock": false, "lock": false,
"__experimentalToolbar": false "__experimentalToolbar": false
}, },
"usesContext": [ "postType", "isInSelectedTab" ] "usesContext": [
"postType",
"isInSelectedTab"
]
} }

View File

@ -1,11 +1,15 @@
{ {
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2, "apiVersion": 3,
"name": "woocommerce/product-shipping-dimensions-fields", "name": "woocommerce/product-shipping-dimensions-fields",
"title": "Product shipping dimensions fields", "title": "Product shipping dimensions fields",
"category": "woocommerce", "category": "woocommerce",
"description": "The product shipping dimensions fields.", "description": "The product shipping dimensions fields.",
"keywords": [ "products", "shipping", "dimensions" ], "keywords": [
"products",
"shipping",
"dimensions"
],
"textdomain": "default", "textdomain": "default",
"attributes": { "attributes": {
"__contentEditable": { "__contentEditable": {
@ -27,5 +31,7 @@
"__experimentalToolbar": false "__experimentalToolbar": false
}, },
"editorStyle": "file:./editor.css", "editorStyle": "file:./editor.css",
"usesContext": [ "postType" ] "usesContext": [
"postType"
]
} }

View File

@ -1,11 +1,15 @@
{ {
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2, "apiVersion": 3,
"name": "woocommerce/product-summary-field", "name": "woocommerce/product-summary-field",
"title": "Product summary", "title": "Product summary",
"category": "widgets", "category": "widgets",
"description": "The product summary.", "description": "The product summary.",
"keywords": [ "products", "summary", "excerpt" ], "keywords": [
"products",
"summary",
"excerpt"
],
"textdomain": "default", "textdomain": "default",
"attributes": { "attributes": {
"property": { "property": {
@ -31,7 +35,10 @@
}, },
"direction": { "direction": {
"type": "string", "type": "string",
"enum": [ "ltr", "rtl" ] "enum": [
"ltr",
"rtl"
]
}, },
"label": { "label": {
"type": "string" "type": "string"
@ -53,5 +60,7 @@
"lock": false "lock": false
}, },
"editorStyle": "file:./editor.css", "editorStyle": "file:./editor.css",
"usesContext": [ "postType" ] "usesContext": [
"postType"
]
} }

View File

@ -1,11 +1,14 @@
{ {
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2, "apiVersion": 3,
"name": "woocommerce/product-tag-field", "name": "woocommerce/product-tag-field",
"title": "Product Tag", "title": "Product Tag",
"category": "widgets", "category": "widgets",
"description": "A field to select product tags.", "description": "A field to select product tags.",
"keywords": [ "products", "tag" ], "keywords": [
"products",
"tag"
],
"textdomain": "default", "textdomain": "default",
"attributes": { "attributes": {
"name": { "name": {
@ -19,7 +22,10 @@
"type": "string" "type": "string"
} }
}, },
"usesContext": [ "postType", "isInSelectedTab" ], "usesContext": [
"postType",
"isInSelectedTab"
],
"supports": { "supports": {
"align": false, "align": false,
"html": false, "html": false,

View File

@ -1,11 +1,14 @@
{ {
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2, "apiVersion": 3,
"name": "woocommerce/product-variation-items-field", "name": "woocommerce/product-variation-items-field",
"title": "Product variations items", "title": "Product variations items",
"category": "woocommerce", "category": "woocommerce",
"description": "The product variations items.", "description": "The product variations items.",
"keywords": [ "products", "variations" ], "keywords": [
"products",
"variations"
],
"textdomain": "default", "textdomain": "default",
"attributes": { "attributes": {
"description": { "description": {
@ -22,6 +25,8 @@
"lock": false, "lock": false,
"__experimentalToolbar": false "__experimentalToolbar": false
}, },
"usesContext": [ "isInSelectedTab" ], "usesContext": [
"isInSelectedTab"
],
"editorStyle": "file:./editor.css" "editorStyle": "file:./editor.css"
} }

View File

@ -1,11 +1,14 @@
{ {
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2, "apiVersion": 3,
"name": "woocommerce/product-variations-options-field", "name": "woocommerce/product-variations-options-field",
"title": "Product variations options", "title": "Product variations options",
"category": "woocommerce", "category": "woocommerce",
"description": "The product variations options.", "description": "The product variations options.",
"keywords": [ "products", "variations" ], "keywords": [
"products",
"variations"
],
"textdomain": "default", "textdomain": "default",
"attributes": { "attributes": {
"description": { "description": {
@ -22,6 +25,9 @@
"lock": false, "lock": false,
"__experimentalToolbar": false "__experimentalToolbar": false
}, },
"usesContext": [ "postType", "isInSelectedTab" ], "usesContext": [
"postType",
"isInSelectedTab"
],
"editorStyle": "file:./editor.css" "editorStyle": "file:./editor.css"
} }

View File

@ -10,9 +10,13 @@
"default": false "default": false
} }
}, },
"keywords": [ "WooCommerce" ], "keywords": [
"usesContext": [ "postId" ], "WooCommerce"
],
"usesContext": [
"postId"
],
"textdomain": "woocommerce", "textdomain": "woocommerce",
"apiVersion": 2, "apiVersion": 3,
"$schema": "https://schemas.wp.org/trunk/block.json" "$schema": "https://schemas.wp.org/trunk/block.json"
} }

View File

@ -1,17 +1,20 @@
{ {
"name": "woocommerce/product-average-rating", "name": "woocommerce/product-average-rating",
"version": "1.0.0",
"title": "Product Average Rating (Beta)", "title": "Product Average Rating (Beta)",
"description": "Display the average rating of a product", "description": "Display the average rating of a product",
"apiVersion": 3,
"category": "woocommerce-product-elements", "category": "woocommerce-product-elements",
"attributes": { "attributes": {
"textAlign": { "textAlign": {
"type": "string" "type": "string"
} }
}, },
"keywords": [ "WooCommerce" ], "keywords": [
"ancestor": [ "woocommerce/single-product" ], "WooCommerce"
],
"ancestor": [
"woocommerce/single-product"
],
"textdomain": "woocommerce", "textdomain": "woocommerce",
"apiVersion": 2,
"$schema": "https://schemas.wp.org/trunk/block.json" "$schema": "https://schemas.wp.org/trunk/block.json"
} }

View File

@ -12,6 +12,7 @@ import edit from './edit';
import { supports } from './support'; import { supports } from './support';
registerBlockType( metadata, { registerBlockType( metadata, {
apiVersion: 3,
icon: { icon: {
src: ( src: (
<Icon <Icon

View File

@ -4,8 +4,14 @@
"title": "Add to Cart Button", "title": "Add to Cart Button",
"description": "Display a call to action button which either adds the product to the cart, or links to the product page.", "description": "Display a call to action button which either adds the product to the cart, or links to the product page.",
"category": "woocommerce-product-elements", "category": "woocommerce-product-elements",
"keywords": [ "WooCommerce" ], "keywords": [
"usesContext": [ "query", "queryId", "postId" ], "WooCommerce"
],
"usesContext": [
"query",
"queryId",
"postId"
],
"textdomain": "woocommerce", "textdomain": "woocommerce",
"attributes": { "attributes": {
"productId": { "productId": {
@ -29,7 +35,10 @@
} }
}, },
"supports": { "supports": {
"align": [ "wide", "full" ], "align": [
"wide",
"full"
],
"color": { "color": {
"background": false, "background": false,
"link": true "link": true
@ -58,7 +67,9 @@
"label": "Outline" "label": "Outline"
} }
], ],
"viewScript": [ "wc-product-button-interactivity-frontend" ], "viewScript": [
"apiVersion": 2, "wc-product-button-interactivity-frontend"
],
"apiVersion": 3,
"$schema": "https://schemas.wp.org/trunk/block.json" "$schema": "https://schemas.wp.org/trunk/block.json"
} }

View File

@ -54,6 +54,7 @@ const featurePluginSupport = {
}; };
// @ts-expect-error: `metadata` currently does not have a type definition in WordPress core // @ts-expect-error: `metadata` currently does not have a type definition in WordPress core
registerBlockType( metadata, { registerBlockType( metadata, {
apiVersion: 3,
icon: { icon: {
src: ( src: (
<Icon <Icon

View File

@ -20,7 +20,6 @@ import {
const blockConfig: BlockConfiguration = { const blockConfig: BlockConfiguration = {
...sharedConfig, ...sharedConfig,
apiVersion: 2,
name: 'woocommerce/product-image', name: 'woocommerce/product-image',
title, title,
icon: { src: icon }, icon: { src: icon },

View File

@ -18,7 +18,6 @@ import {
const blockConfig = { const blockConfig = {
...sharedConfig, ...sharedConfig,
apiVersion: 2,
title, title,
description, description,
usesContext: [ 'query', 'queryId', 'postId' ], usesContext: [ 'query', 'queryId', 'postId' ],

View File

@ -5,7 +5,9 @@
"title": "Product Details", "title": "Product Details",
"description": "Display a product's description, attributes, and reviews.", "description": "Display a product's description, attributes, and reviews.",
"category": "woocommerce-product-elements", "category": "woocommerce-product-elements",
"keywords": [ "WooCommerce" ], "keywords": [
"WooCommerce"
],
"supports": { "supports": {
"align": true, "align": true,
"spacing": { "spacing": {
@ -13,6 +15,6 @@
} }
}, },
"textdomain": "woocommerce", "textdomain": "woocommerce",
"apiVersion": 2, "apiVersion": 3,
"$schema": "https://schemas.wp.org/trunk/block.json" "$schema": "https://schemas.wp.org/trunk/block.json"
} }

View File

@ -9,9 +9,15 @@
"align": true, "align": true,
"multiple": false "multiple": false
}, },
"keywords": [ "WooCommerce" ], "keywords": [
"usesContext": [ "postId", "postType", "queryId" ], "WooCommerce"
],
"usesContext": [
"postId",
"postType",
"queryId"
],
"textdomain": "woocommerce", "textdomain": "woocommerce",
"apiVersion": 2, "apiVersion": 3,
"$schema": "https://schemas.wp.org/trunk/block.json" "$schema": "https://schemas.wp.org/trunk/block.json"
} }

View File

@ -9,9 +9,15 @@
"align": true, "align": true,
"reusable": false "reusable": false
}, },
"keywords": [ "WooCommerce" ], "keywords": [
"usesContext": [ "postId", "postType", "queryId" ], "WooCommerce"
],
"usesContext": [
"postId",
"postType",
"queryId"
],
"textdomain": "woocommerce", "textdomain": "woocommerce",
"apiVersion": 2, "apiVersion": 3,
"$schema": "https://schemas.wp.org/trunk/block.json" "$schema": "https://schemas.wp.org/trunk/block.json"
} }

View File

@ -5,11 +5,15 @@
"title": "Product Reviews", "title": "Product Reviews",
"description": "A block that shows the reviews for a product.", "description": "A block that shows the reviews for a product.",
"category": "woocommerce-product-elements", "category": "woocommerce-product-elements",
"keywords": [ "WooCommerce" ], "keywords": [
"WooCommerce"
],
"supports": {}, "supports": {},
"attributes": {}, "attributes": {},
"usesContext": [ "postId" ], "usesContext": [
"postId"
],
"textdomain": "woocommerce", "textdomain": "woocommerce",
"apiVersion": 2, "apiVersion": 3,
"$schema": "https://schemas.wp.org/trunk/block.json" "$schema": "https://schemas.wp.org/trunk/block.json"
} }

View File

@ -26,13 +26,21 @@
"default": false "default": false
} }
}, },
"usesContext": [ "query", "queryId", "postId" ], "usesContext": [
"keywords": [ "WooCommerce" ], "query",
"queryId",
"postId"
],
"keywords": [
"WooCommerce"
],
"supports": { "supports": {
"align": true "align": true
}, },
"ancestor": [ "woocommerce/single-product" ], "ancestor": [
"woocommerce/single-product"
],
"textdomain": "woocommerce", "textdomain": "woocommerce",
"apiVersion": 2, "apiVersion": 3,
"$schema": "https://schemas.wp.org/trunk/block.json" "$schema": "https://schemas.wp.org/trunk/block.json"
} }

View File

@ -12,6 +12,7 @@ import edit from './edit';
import { supports } from './support'; import { supports } from './support';
registerBlockType( metadata, { registerBlockType( metadata, {
apiVersion: 3,
icon: { icon: {
src: ( src: (
<Icon <Icon

View File

@ -1,6 +1,5 @@
{ {
"name": "woocommerce/product-rating-stars", "name": "woocommerce/product-rating-stars",
"version": "1.0.0",
"title": "Product Rating Stars", "title": "Product Rating Stars",
"description": "Display the average rating of a product with stars", "description": "Display the average rating of a product with stars",
"category": "woocommerce-product-elements", "category": "woocommerce-product-elements",
@ -26,13 +25,21 @@
"default": false "default": false
} }
}, },
"usesContext": [ "query", "queryId", "postId" ], "usesContext": [
"keywords": [ "WooCommerce" ], "query",
"queryId",
"postId"
],
"keywords": [
"WooCommerce"
],
"supports": { "supports": {
"align": true "align": true
}, },
"ancestor": [ "woocommerce/single-product" ], "ancestor": [
"woocommerce/single-product"
],
"textdomain": "woocommerce", "textdomain": "woocommerce",
"apiVersion": 2, "apiVersion": 3,
"$schema": "https://schemas.wp.org/trunk/block.json" "$schema": "https://schemas.wp.org/trunk/block.json"
} }

View File

@ -12,6 +12,7 @@ import edit from './edit';
import { supports } from './support'; import { supports } from './support';
registerBlockType( metadata, { registerBlockType( metadata, {
apiVersion: 3,
icon: { icon: {
src: ( src: (
<Icon <Icon

View File

@ -26,12 +26,18 @@
"default": false "default": false
} }
}, },
"usesContext": [ "query", "queryId", "postId" ], "usesContext": [
"keywords": [ "WooCommerce" ], "query",
"queryId",
"postId"
],
"keywords": [
"WooCommerce"
],
"supports": { "supports": {
"align": true "align": true
}, },
"textdomain": "woocommerce", "textdomain": "woocommerce",
"apiVersion": 2, "apiVersion": 3,
"$schema": "https://schemas.wp.org/trunk/block.json" "$schema": "https://schemas.wp.org/trunk/block.json"
} }

View File

@ -9,9 +9,15 @@
"align": true, "align": true,
"reusable": false "reusable": false
}, },
"keywords": [ "WooCommerce" ], "keywords": [
"usesContext": [ "postId", "postType", "queryId" ], "WooCommerce"
],
"usesContext": [
"postId",
"postType",
"queryId"
],
"textdomain": "woocommerce", "textdomain": "woocommerce",
"apiVersion": 2, "apiVersion": 3,
"$schema": "https://schemas.wp.org/trunk/block.json" "$schema": "https://schemas.wp.org/trunk/block.json"
} }

View File

@ -22,7 +22,6 @@ const blockConfig: BlockConfiguration = {
title, title,
description, description,
icon: { src: icon }, icon: { src: icon },
apiVersion: 2,
supports, supports,
attributes, attributes,
edit, edit,

View File

@ -25,6 +25,7 @@ const sharedConfig: Omit< BlockConfiguration, 'attributes' | 'title' > = {
/> />
), ),
}, },
apiVersion: 3,
supports: { supports: {
html: false, html: false,
}, },

View File

@ -19,7 +19,6 @@ import {
const blockConfig: BlockConfiguration = { const blockConfig: BlockConfiguration = {
...sharedConfig, ...sharedConfig,
apiVersion: 2,
title, title,
description, description,
icon: { src: icon }, icon: { src: icon },

View File

@ -20,7 +20,6 @@ import {
const blockConfig: BlockConfiguration = { const blockConfig: BlockConfiguration = {
...sharedConfig, ...sharedConfig,
apiVersion: 2,
title, title,
description, description,
icon: { src: icon }, icon: { src: icon },

View File

@ -23,7 +23,6 @@ const blockConfig: BlockConfiguration = {
// Product Summary is not expected to be available in Product Collection, // Product Summary is not expected to be available in Product Collection,
// Products (Beta) or Single Product blocks. They use core/post-summary variation. // Products (Beta) or Single Product blocks. They use core/post-summary variation.
ancestor: [ 'woocommerce/all-products' ], ancestor: [ 'woocommerce/all-products' ],
apiVersion: 2,
title, title,
description, description,
icon: { src: icon }, icon: { src: icon },

View File

@ -24,7 +24,6 @@ const blockConfig: BlockConfiguration = {
// Product Title is not expected to be available in Product Collection // Product Title is not expected to be available in Product Collection
// nor Products (Beta). They use core/post-title variation. // nor Products (Beta). They use core/post-title variation.
ancestor: [ 'woocommerce/all-products', 'woocommerce/single-product' ], ancestor: [ 'woocommerce/all-products', 'woocommerce/single-product' ],
apiVersion: 2,
title, title,
description, description,
icon: { src: icon }, icon: { src: icon },

View File

@ -4,7 +4,9 @@
"title": "Active Filters Controls", "title": "Active Filters Controls",
"description": "Display the currently active filters.", "description": "Display the currently active filters.",
"category": "woocommerce", "category": "woocommerce",
"keywords": [ "WooCommerce" ], "keywords": [
"WooCommerce"
],
"supports": { "supports": {
"html": false, "html": false,
"multiple": false, "multiple": false,
@ -26,6 +28,6 @@
} }
}, },
"textdomain": "woocommerce", "textdomain": "woocommerce",
"apiVersion": 2, "apiVersion": 3,
"$schema": "https://schemas.wp.org/trunk/block.json" "$schema": "https://schemas.wp.org/trunk/block.json"
} }

View File

@ -17,6 +17,7 @@ import { Attributes } from './types';
import deprecated from './deprecated'; import deprecated from './deprecated';
registerBlockType( metadata, { registerBlockType( metadata, {
apiVersion: 3,
icon: { icon: {
src: ( src: (
<Icon <Icon

View File

@ -4,7 +4,9 @@
"title": "Filter by Attribute Controls", "title": "Filter by Attribute Controls",
"description": "Enable customers to filter the product grid by selecting one or more attributes, such as color.", "description": "Enable customers to filter the product grid by selecting one or more attributes, such as color.",
"category": "woocommerce", "category": "woocommerce",
"keywords": [ "WooCommerce" ], "keywords": [
"WooCommerce"
],
"supports": { "supports": {
"html": false, "html": false,
"color": { "color": {
@ -53,6 +55,6 @@
} }
}, },
"textdomain": "woocommerce", "textdomain": "woocommerce",
"apiVersion": 2, "apiVersion": 3,
"$schema": "https://schemas.wp.org/trunk/block.json" "$schema": "https://schemas.wp.org/trunk/block.json"
} }

View File

@ -16,6 +16,7 @@ import metadata from './block.json';
import deprecated from './deprecated'; import deprecated from './deprecated';
registerBlockType( metadata, { registerBlockType( metadata, {
apiVersion: 3,
icon: { icon: {
src: ( src: (
<Icon <Icon

View File

@ -4,7 +4,9 @@
"title": "Store Breadcrumbs", "title": "Store Breadcrumbs",
"description": "Enable customers to keep track of their location within the store and navigate back to parent pages.", "description": "Enable customers to keep track of their location within the store and navigate back to parent pages.",
"category": "woocommerce", "category": "woocommerce",
"keywords": [ "WooCommerce" ], "keywords": [
"WooCommerce"
],
"textdomain": "woocommerce", "textdomain": "woocommerce",
"attributes": { "attributes": {
"contentJustification": { "contentJustification": {
@ -20,7 +22,10 @@
} }
}, },
"supports": { "supports": {
"align": [ "wide", "full" ], "align": [
"wide",
"full"
],
"color": { "color": {
"background": false, "background": false,
"link": true "link": true
@ -31,6 +36,6 @@
"lineHeight": true "lineHeight": true
} }
}, },
"apiVersion": 2, "apiVersion": 3,
"$schema": "https://schemas.wp.org/trunk/block.json" "$schema": "https://schemas.wp.org/trunk/block.json"
} }

View File

@ -41,6 +41,8 @@ body.wc-lock-selected-block--remove {
textarea { textarea {
font-weight: 700; // Ensure correct font-weight in site-editor. font-weight: 700; // Ensure correct font-weight in site-editor.
vertical-align: middle; vertical-align: middle;
resize: none !important;
height: auto !important;
} }
} }
} }

View File

@ -20,6 +20,7 @@ import './inner-blocks';
*/ */
const settings = { const settings = {
title: __( 'Cart', 'woocommerce' ), title: __( 'Cart', 'woocommerce' ),
apiVersion: 3,
icon: { icon: {
src: ( src: (
<Icon <Icon

View File

@ -11,8 +11,10 @@
"reusable": false, "reusable": false,
"inserter": true "inserter": true
}, },
"parent": [ "woocommerce/cart-totals-block" ], "parent": [
"woocommerce/cart-totals-block"
],
"textdomain": "woocommerce", "textdomain": "woocommerce",
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2 "apiVersion": 3
} }

View File

@ -11,8 +11,10 @@
"reusable": false, "reusable": false,
"inserter": true "inserter": true
}, },
"parent": [ "woocommerce/cart-items-block" ], "parent": [
"woocommerce/cart-items-block"
],
"textdomain": "woocommerce", "textdomain": "woocommerce",
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2 "apiVersion": 3
} }

View File

@ -25,8 +25,10 @@
} }
} }
}, },
"parent": [ "woocommerce/cart-cross-sells-block" ], "parent": [
"woocommerce/cart-cross-sells-block"
],
"textdomain": "woocommerce", "textdomain": "woocommerce",
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2 "apiVersion": 3
} }

View File

@ -21,8 +21,10 @@
} }
} }
}, },
"parent": [ "woocommerce/cart-totals-block" ], "parent": [
"woocommerce/cart-totals-block"
],
"textdomain": "woocommerce", "textdomain": "woocommerce",
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2 "apiVersion": 3
} }

View File

@ -21,8 +21,10 @@
} }
} }
}, },
"parent": [ "woocommerce/filled-cart-block" ], "parent": [
"woocommerce/filled-cart-block"
],
"textdomain": "woocommerce", "textdomain": "woocommerce",
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2 "apiVersion": 3
} }

View File

@ -21,8 +21,10 @@
} }
} }
}, },
"parent": [ "woocommerce/cart-items-block" ], "parent": [
"woocommerce/cart-items-block"
],
"textdomain": "woocommerce", "textdomain": "woocommerce",
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2 "apiVersion": 3
} }

View File

@ -21,8 +21,10 @@
} }
} }
}, },
"parent": [ "woocommerce/cart-totals-block" ], "parent": [
"woocommerce/cart-totals-block"
],
"textdomain": "woocommerce", "textdomain": "woocommerce",
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2 "apiVersion": 3
} }

View File

@ -23,8 +23,10 @@
} }
} }
}, },
"parent": [ "woocommerce/cart-order-summary-block" ], "parent": [
"woocommerce/cart-order-summary-block"
],
"textdomain": "woocommerce", "textdomain": "woocommerce",
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2 "apiVersion": 3
} }

View File

@ -24,8 +24,10 @@
} }
} }
}, },
"parent": [ "woocommerce/cart-order-summary-totals-block" ], "parent": [
"woocommerce/cart-order-summary-totals-block"
],
"textdomain": "woocommerce", "textdomain": "woocommerce",
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2 "apiVersion": 3
} }

View File

@ -24,8 +24,10 @@
} }
} }
}, },
"parent": [ "woocommerce/cart-order-summary-totals-block" ], "parent": [
"woocommerce/cart-order-summary-totals-block"
],
"textdomain": "woocommerce", "textdomain": "woocommerce",
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2 "apiVersion": 3
} }

View File

@ -27,8 +27,10 @@
} }
} }
}, },
"parent": [ "woocommerce/cart-order-summary-block" ], "parent": [
"woocommerce/cart-order-summary-block"
],
"textdomain": "woocommerce", "textdomain": "woocommerce",
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2 "apiVersion": 3
} }

View File

@ -20,8 +20,10 @@
} }
} }
}, },
"parent": [ "woocommerce/cart-order-summary-totals-block" ], "parent": [
"woocommerce/cart-order-summary-totals-block"
],
"textdomain": "woocommerce", "textdomain": "woocommerce",
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2 "apiVersion": 3
} }

View File

@ -24,8 +24,10 @@
} }
} }
}, },
"parent": [ "woocommerce/cart-order-summary-totals-block" ], "parent": [
"woocommerce/cart-order-summary-totals-block"
],
"textdomain": "woocommerce", "textdomain": "woocommerce",
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2 "apiVersion": 3
} }

View File

@ -24,8 +24,10 @@
} }
} }
}, },
"parent": [ "woocommerce/cart-order-summary-totals-block" ], "parent": [
"woocommerce/cart-order-summary-totals-block"
],
"textdomain": "woocommerce", "textdomain": "woocommerce",
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2 "apiVersion": 3
} }

View File

@ -24,8 +24,10 @@
} }
} }
}, },
"parent": [ "woocommerce/cart-order-summary-block" ], "parent": [
"woocommerce/cart-order-summary-block"
],
"textdomain": "woocommerce", "textdomain": "woocommerce",
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2 "apiVersion": 3
} }

View File

@ -28,8 +28,10 @@
} }
} }
}, },
"parent": [ "woocommerce/filled-cart-block" ], "parent": [
"woocommerce/filled-cart-block"
],
"textdomain": "woocommerce", "textdomain": "woocommerce",
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2 "apiVersion": 3
} }

View File

@ -5,7 +5,9 @@
"description": "Contains blocks that are displayed when the cart is empty.", "description": "Contains blocks that are displayed when the cart is empty.",
"category": "woocommerce", "category": "woocommerce",
"supports": { "supports": {
"align": [ "wide" ], "align": [
"wide"
],
"html": false, "html": false,
"multiple": false, "multiple": false,
"reusable": false, "reusable": false,
@ -21,8 +23,10 @@
} }
} }
}, },
"parent": [ "woocommerce/cart" ], "parent": [
"woocommerce/cart"
],
"textdomain": "woocommerce", "textdomain": "woocommerce",
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2 "apiVersion": 3
} }

View File

@ -5,7 +5,9 @@
"description": "Contains blocks that are displayed when the cart contains products.", "description": "Contains blocks that are displayed when the cart contains products.",
"category": "woocommerce", "category": "woocommerce",
"supports": { "supports": {
"align": [ "wide" ], "align": [
"wide"
],
"html": false, "html": false,
"multiple": false, "multiple": false,
"reusable": false, "reusable": false,
@ -21,8 +23,10 @@
} }
} }
}, },
"parent": [ "woocommerce/cart" ], "parent": [
"woocommerce/cart"
],
"textdomain": "woocommerce", "textdomain": "woocommerce",
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2 "apiVersion": 3
} }

View File

@ -20,8 +20,10 @@
} }
} }
}, },
"parent": [ "woocommerce/cart-totals-block" ], "parent": [
"woocommerce/cart-totals-block"
],
"textdomain": "woocommerce", "textdomain": "woocommerce",
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2 "apiVersion": 3
} }

View File

@ -4,7 +4,9 @@
"title": "Catalog Sorting", "title": "Catalog Sorting",
"description": "Enable customers to change the sorting order of the products.", "description": "Enable customers to change the sorting order of the products.",
"category": "woocommerce", "category": "woocommerce",
"keywords": [ "WooCommerce" ], "keywords": [
"WooCommerce"
],
"supports": { "supports": {
"color": { "color": {
"text": true, "text": true,
@ -21,6 +23,6 @@
} }
}, },
"textdomain": "woocommerce", "textdomain": "woocommerce",
"apiVersion": 2, "apiVersion": 3,
"$schema": "https://schemas.wp.org/trunk/block.json" "$schema": "https://schemas.wp.org/trunk/block.json"
} }

View File

@ -4,9 +4,13 @@
"title": "Checkout", "title": "Checkout",
"description": "Display a checkout form so your customers can submit orders.", "description": "Display a checkout form so your customers can submit orders.",
"category": "woocommerce", "category": "woocommerce",
"keywords": [ "WooCommerce" ], "keywords": [
"WooCommerce"
],
"supports": { "supports": {
"align": [ "wide" ], "align": [
"wide"
],
"html": false, "html": false,
"multiple": false "multiple": false
}, },
@ -56,6 +60,6 @@
} }
}, },
"textdomain": "woocommerce", "textdomain": "woocommerce",
"apiVersion": 2, "apiVersion": 3,
"$schema": "https://schemas.wp.org/trunk/block.json" "$schema": "https://schemas.wp.org/trunk/block.json"
} }

View File

@ -9,11 +9,13 @@
display: block; display: block;
} }
} }
.wc-block-components-checkout-step__title { .wc-block-components-checkout-step__title,
.wc-block-components-checkout-step__description {
display: flex; display: flex;
width: 100%; width: 100%;
.block-editor-plain-text { .block-editor-plain-text {
height: auto !important; height: auto !important;
resize: none !important;
} }
} }

View File

@ -21,8 +21,10 @@
} }
} }
}, },
"parent": [ "woocommerce/checkout-fields-block" ], "parent": [
"woocommerce/checkout-fields-block"
],
"textdomain": "woocommerce", "textdomain": "woocommerce",
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2 "apiVersion": 3
} }

View File

@ -23,8 +23,10 @@
} }
} }
}, },
"parent": [ "woocommerce/checkout-fields-block" ], "parent": [
"woocommerce/checkout-fields-block"
],
"textdomain": "woocommerce", "textdomain": "woocommerce",
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2 "apiVersion": 3
} }

View File

@ -21,8 +21,10 @@
} }
} }
}, },
"parent": [ "woocommerce/checkout-fields-block" ], "parent": [
"woocommerce/checkout-fields-block"
],
"textdomain": "woocommerce", "textdomain": "woocommerce",
"$schema": "https://schemas.wp.org/trunk/block.json", "$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2 "apiVersion": 3
} }

Some files were not shown because too many files have changed in this diff Show More