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",
"version": "2.0.0",
"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",
"apiVersion": 2,
"apiVersion": 3,
"name": "woocommerce/product-checkbox-field",
"title": "Product checkbox control",
"category": "woocommerce",
"description": "A reusable checkbox for the product editor.",
"keywords": [ "products", "checkbox", "input" ],
"keywords": [
"products",
"checkbox",
"input"
],
"textdomain": "default",
"attributes": {
"title": {
@ -38,5 +42,7 @@
"__experimentalToolbar": false
},
"editorStyle": "file:./editor.css",
"usesContext": [ "postType" ]
}
"usesContext": [
"postType"
]
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -4,8 +4,14 @@
"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.",
"category": "woocommerce-product-elements",
"keywords": [ "WooCommerce" ],
"usesContext": [ "query", "queryId", "postId" ],
"keywords": [
"WooCommerce"
],
"usesContext": [
"query",
"queryId",
"postId"
],
"textdomain": "woocommerce",
"attributes": {
"productId": {
@ -29,7 +35,10 @@
}
},
"supports": {
"align": [ "wide", "full" ],
"align": [
"wide",
"full"
],
"color": {
"background": false,
"link": true
@ -58,7 +67,9 @@
"label": "Outline"
}
],
"viewScript": [ "wc-product-button-interactivity-frontend" ],
"apiVersion": 2,
"viewScript": [
"wc-product-button-interactivity-frontend"
],
"apiVersion": 3,
"$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
registerBlockType( metadata, {
apiVersion: 3,
icon: {
src: (
<Icon

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -11,8 +11,10 @@
"reusable": false,
"inserter": true
},
"parent": [ "woocommerce/cart-items-block" ],
"parent": [
"woocommerce/cart-items-block"
],
"textdomain": "woocommerce",
"$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",
"$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",
"$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",
"$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",
"$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",
"$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",
"$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",
"$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",
"$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",
"$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",
"$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",
"$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",
"$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",
"$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",
"$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.",
"category": "woocommerce",
"supports": {
"align": [ "wide" ],
"align": [
"wide"
],
"html": false,
"multiple": false,
"reusable": false,
@ -21,8 +23,10 @@
}
}
},
"parent": [ "woocommerce/cart" ],
"parent": [
"woocommerce/cart"
],
"textdomain": "woocommerce",
"$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.",
"category": "woocommerce",
"supports": {
"align": [ "wide" ],
"align": [
"wide"
],
"html": false,
"multiple": false,
"reusable": false,
@ -21,8 +23,10 @@
}
}
},
"parent": [ "woocommerce/cart" ],
"parent": [
"woocommerce/cart"
],
"textdomain": "woocommerce",
"$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",
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2
}
"apiVersion": 3
}

View File

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

View File

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

View File

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

View File

@ -21,8 +21,10 @@
}
}
},
"parent": [ "woocommerce/checkout-fields-block" ],
"parent": [
"woocommerce/checkout-fields-block"
],
"textdomain": "woocommerce",
"$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",
"$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",
"$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