diff --git a/.markdownlint.json b/.markdownlint.json index 5efe30c7d25..46f253c2e8f 100644 --- a/.markdownlint.json +++ b/.markdownlint.json @@ -1,5 +1,3 @@ - - { "default": true, "MD003": { "style": "atx" }, @@ -9,7 +7,7 @@ "MD025": false, "MD029": false, "MD033": false, - "MD046": {"style": "fenced"}, + "MD046": { "style": "fenced" }, "no-hard-tabs": false, "whitespace": false } diff --git a/assets/js/base/context/tsconfig.json b/assets/js/base/context/tsconfig.json index f486316e06e..8de56c5a7d5 100644 --- a/assets/js/base/context/tsconfig.json +++ b/assets/js/base/context/tsconfig.json @@ -8,7 +8,7 @@ "../../settings/blocks/index.ts", "../../base/hooks/index.js", "../../base/utils/", - "../../utils", + "../../utils", "../../data/", "../../types/", "../components", diff --git a/assets/js/blocks/cart/inner-blocks/cart-cross-sells-block/block.json b/assets/js/blocks/cart/inner-blocks/cart-cross-sells-block/block.json new file mode 100644 index 00000000000..5af4f5b4166 --- /dev/null +++ b/assets/js/blocks/cart/inner-blocks/cart-cross-sells-block/block.json @@ -0,0 +1,17 @@ +{ + "name": "woocommerce/cart-cross-sells-block", + "version": "1.0.0", + "title": "Cart Cross-Sells block", + "description": "Shows the Cross-Sells block.", + "category": "woocommerce", + "supports": { + "align": false, + "html": false, + "multiple": false, + "reusable": false, + "inserter": false + }, + "parent": [ "woocommerce/cart-items-block" ], + "textdomain": "woo-gutenberg-products-block", + "apiVersion": 2 +} diff --git a/assets/js/blocks/cart/inner-blocks/cart-cross-sells-block/edit.tsx b/assets/js/blocks/cart/inner-blocks/cart-cross-sells-block/edit.tsx new file mode 100644 index 00000000000..a2ea2931276 --- /dev/null +++ b/assets/js/blocks/cart/inner-blocks/cart-cross-sells-block/edit.tsx @@ -0,0 +1,45 @@ +/** + * External dependencies + */ +import { useBlockProps, InnerBlocks } from '@wordpress/block-editor'; +import type { TemplateArray } from '@wordpress/blocks'; +import { __ } from '@wordpress/i18n'; + +/** + * Internal dependencies + */ +export const Edit = (): JSX.Element => { + const blockProps = useBlockProps( { + className: 'wc-block-cart__cross-sells', + } ); + + const defaultTemplate = [ + [ + 'core/heading', + { + content: __( + 'You may be interested in…', + 'woo-gutenberg-products-block' + ), + level: 3, + }, + , + [], + ], + [ 'woocommerce/cart-cross-sells-products-block', {}, [] ], + ] as TemplateArray; + + return ( +
This hook fires when an item is added to the cart. This is triggered from the Store API in this context, but WooCommerce core add to cart events trigger the same hook.
" - }, - "args": 6 - }, - { - "name": "woocommerce_after_main_content", - "file": "BlockTypes/ClassicTemplate.php", - "type": "action", - "doc": { - "description": "Hook: woocommerce_after_main_content", - "long_description": "Called after rendering the main content for a product.", - "tags": [ - { - "name": "see", - "content": "Outputs closing DIV for the content (priority 10)", - "refers": "woocommerce_output_content_wrapper_end()" - } - ], - "long_description_html": "Called after rendering the main content for a product.
" - }, - "args": 0 - }, - { - "name": "woocommerce_after_main_content", - "file": "BlockTypes/ClassicTemplate.php", - "type": "action", - "doc": { - "description": "Hook: woocommerce_after_main_content", - "long_description": "Called after rendering the main content for a product.", - "tags": [ - { - "name": "see", - "content": "Outputs closing DIV for the content (priority 10)", - "refers": "woocommerce_output_content_wrapper_end()" - } - ], - "long_description_html": "Called after rendering the main content for a product.
" - }, - "args": 0 - }, - { - "name": "woocommerce_after_shop_loop", - "file": "BlockTypes/ClassicTemplate.php", - "type": "action", - "doc": { - "description": "Hook: woocommerce_after_shop_loop.", - "long_description": "", - "tags": [ - { - "name": "see", - "content": "Renders pagination (priority 10)", - "refers": "woocommerce_pagination()" - } - ], - "long_description_html": "" - }, - "args": 0 - }, - { - "name": "woocommerce_applied_coupon", - "file": "StoreApi/Utilities/CartController.php", - "type": "action", - "doc": { - "description": "Fires after a coupon has been applied to the cart.", - "long_description": "", - "tags": [ - { - "name": "internal", - "content": "Matches action name in WooCommerce core." - }, - { - "name": "param", - "content": "The coupon code that was applied.", - "types": [ - "string" - ], - "variable": "$coupon_code" - } - ], - "long_description_html": "" - }, - "args": 1 - }, - { - "name": "woocommerce_archive_description", - "file": "BlockTypes/ClassicTemplate.php", - "type": "action", - "doc": { - "description": "Hook: woocommerce_archive_description.", - "long_description": "", - "tags": [ - { - "name": "see", - "content": "Renders the taxonomy archive description (priority 10)", - "refers": "woocommerce_taxonomy_archive_description()" - }, - { - "name": "see", - "content": "Renders the product archive description (priority 10)", - "refers": "woocommerce_product_archive_description()" - } - ], - "long_description_html": "" - }, - "args": 0 - }, - { - "name": "woocommerce_before_main_content", - "file": "BlockTypes/ClassicTemplate.php", - "type": "action", - "doc": { - "description": "Hook: woocommerce_before_main_content", - "long_description": "Called before rendering the main content for a product.", - "tags": [ - { - "name": "see", - "content": "Outputs opening DIV for the content (priority 10)", - "refers": "woocommerce_output_content_wrapper()" - }, - { - "name": "see", - "content": "Outputs breadcrumb trail to the current product (priority 20)", - "refers": "woocommerce_breadcrumb()" - }, - { - "name": "see", - "content": "Outputs schema markup (priority 30)", - "refers": "WC_Structured_Data::generate_website_data()" - } - ], - "long_description_html": "Called before rendering the main content for a product.
" - }, - "args": 0 - }, - { - "name": "woocommerce_before_main_content", - "file": "BlockTypes/ClassicTemplate.php", - "type": "action", - "doc": { - "description": "Hook: woocommerce_before_main_content", - "long_description": "Called before rendering the main content for a product.", - "tags": [ - { - "name": "see", - "content": "Outputs opening DIV for the content (priority 10)", - "refers": "woocommerce_output_content_wrapper()" - }, - { - "name": "see", - "content": "Outputs breadcrumb trail to the current product (priority 20)", - "refers": "woocommerce_breadcrumb()" - }, - { - "name": "see", - "content": "Outputs schema markup (priority 30)", - "refers": "WC_Structured_Data::generate_website_data()" - } - ], - "long_description_html": "Called before rendering the main content for a product.
" - }, - "args": 0 - }, - { - "name": "woocommerce_before_shop_loop", - "file": "BlockTypes/ClassicTemplate.php", - "type": "action", - "doc": { - "description": "Hook: woocommerce_before_shop_loop.", - "long_description": "", - "tags": [ - { - "name": "see", - "content": "Render error notices (priority 10)", - "refers": "woocommerce_output_all_notices()" - }, - { - "name": "see", - "content": "Show number of results found (priority 20)", - "refers": "woocommerce_result_count()" - }, - { - "name": "see", - "content": "Show form to control sort order (priority 30)", - "refers": "woocommerce_catalog_ordering()" - } - ], - "long_description_html": "" - }, - "args": 0 - }, - { - "name": "woocommerce_blocks_cart_enqueue_data", - "file": "BlockTypes/MiniCart.php", - "type": "action", - "doc": { - "description": "Fires after cart block data is registered.", - "long_description": "", - "tags": [], - "long_description_html": "" - }, - "args": 0 - }, - { - "name": "woocommerce_blocks_cart_enqueue_data", - "file": "BlockTypes/Cart.php", - "type": "action", - "doc": { - "description": "Fires after cart block data is registered.", - "long_description": "", - "tags": [], - "long_description_html": "" - }, - "args": 0 - }, - { - "name": "woocommerce_blocks_checkout_enqueue_data", - "file": "BlockTypes/Checkout.php", - "type": "action", - "doc": { - "description": "Fires after checkout block data is registered.", - "long_description": "", - "tags": [], - "long_description_html": "" - }, - "args": 0 - }, - { - "name": "woocommerce_blocks_enqueue_cart_block_scripts_after", - "file": "BlockTypes/Cart.php", - "type": "action", - "doc": { - "description": "Fires after cart block scripts are enqueued.", - "long_description": "", - "tags": [], - "long_description_html": "" - }, - "args": 0 - }, - { - "name": "woocommerce_blocks_enqueue_cart_block_scripts_before", - "file": "BlockTypes/Cart.php", - "type": "action", - "doc": { - "description": "Fires before cart block scripts are enqueued.", - "long_description": "", - "tags": [], - "long_description_html": "" - }, - "args": 0 - }, - { - "name": "woocommerce_blocks_enqueue_checkout_block_scripts_after", - "file": "BlockTypes/Checkout.php", - "type": "action", - "doc": { - "description": "Fires after checkout block scripts are enqueued.", - "long_description": "", - "tags": [], - "long_description_html": "" - }, - "args": 0 - }, - { - "name": "woocommerce_blocks_enqueue_checkout_block_scripts_before", - "file": "BlockTypes/Checkout.php", - "type": "action", - "doc": { - "description": "Fires before checkout block scripts are enqueued.", - "long_description": "", - "tags": [], - "long_description_html": "" - }, - "args": 0 - }, - { - "name": "woocommerce_blocks_{$this->registry_identifier}_registration", - "file": "Integrations/IntegrationRegistry.php", - "type": "action", - "doc": { - "description": "Fires when the IntegrationRegistry is initialized.", - "long_description": "Runs before integrations are initialized allowing new integration to be registered for use. This should be used as the primary hook for integrations to include their scripts, styles, and other code extending the blocks.", - "tags": [ - { - "name": "param", - "content": "Instance of the IntegrationRegistry class which exposes the IntegrationRegistry::register() method.", - "types": [ - "\\Automattic\\WooCommerce\\Blocks\\Integrations\\IntegrationRegistry" - ], - "variable": "$this" - } - ], - "long_description_html": "Runs before integrations are initialized allowing new integration to be registered for use. This should be used as the primary hook for integrations to include their scripts, styles, and other code extending the blocks.
" - }, - "args": 1 - }, - { - "name": "woocommerce_check_cart_items", - "file": "StoreApi/Utilities/CartController.php", - "type": "action", - "doc": { - "description": "Fires when cart items are being validated.", - "long_description": "Allow 3rd parties to validate cart items. This is a legacy hook from Woo core. This filter will be deprecated because it encourages usage of wc_add_notice. For the API we need to capture notices and convert to wp errors instead.", - "tags": [ - { - "name": "deprecated", - "content": "" - }, - { - "name": "internal", - "content": "Matches action name in WooCommerce core." - } - ], - "long_description_html": "Allow 3rd parties to validate cart items. This is a legacy hook from Woo core. This filter will be deprecated because it encourages usage of wc_add_notice. For the API we need to capture notices and convert to wp errors instead.
" - }, - "args": 0 - }, - { - "name": "woocommerce_created_customer", - "file": "StoreApi/Routes/V1/Checkout.php", - "type": "action", - "doc": { - "description": "Fires after a customer account has been registered.", - "long_description": "This hook fires after customer accounts are created and passes the customer data.", - "tags": [ - { - "name": "internal", - "content": "Matches filter name in WooCommerce core." - }, - { - "name": "param", - "content": "New customer (user) ID.", - "types": [ - "integer" - ], - "variable": "$customer_id" - }, - { - "name": "param", - "content": "Array of customer (user) data.", - "types": [ - "array" - ], - "variable": "$new_customer_data" - }, - { - "name": "param", - "content": "The generated password for the account.", - "types": [ - "string" - ], - "variable": "$password_generated" - } - ], - "long_description_html": "This hook fires after customer accounts are created and passes the customer data.
" - }, - "args": 3 - }, - { - "name": "woocommerce_no_products_found", - "file": "BlockTypes/ClassicTemplate.php", - "type": "action", - "doc": { - "description": "Hook: woocommerce_no_products_found.", - "long_description": "", - "tags": [ - { - "name": "see", - "content": "Default no products found content (priority 10)", - "refers": "wc_no_products_found()" - } - ], - "long_description_html": "" - }, - "args": 0 - }, - { - "name": "woocommerce_register_post", - "file": "StoreApi/Routes/V1/Checkout.php", - "type": "action", - "doc": { - "description": "Fires before a customer account is registered.", - "long_description": "This hook fires before customer accounts are created and passes the form data (username, email) and an array of errors.\n This could be used to add extra validation logic and append errors to the array.", - "tags": [ - { - "name": "internal", - "content": "Matches filter name in WooCommerce core." - }, - { - "name": "param", - "content": "Customer username.", - "types": [ - "string" - ], - "variable": "$username" - }, - { - "name": "param", - "content": "Customer email address.", - "types": [ - "string" - ], - "variable": "$user_email" - }, - { - "name": "param", - "content": "Error object.", - "types": [ - "\\WP_Error" - ], - "variable": "$errors" - } - ], - "long_description_html": "This hook fires before customer accounts are created and passes the form data (username, email) and an array of errors.
This could be used to add extra validation logic and append errors to the array.
" - }, - "args": 3 - }, - { - "name": "woocommerce_rest_checkout_process_payment_with_context", - "file": "StoreApi/Routes/V1/Checkout.php", - "type": "action_reference", - "doc": { - "description": "Process payment with context.", - "long_description": "", - "tags": [ - { - "name": "hook", - "content": "woocommerce_rest_checkout_process_payment_with_context" - }, - { - "name": "throws", - "content": "If there is an error taking payment, an \\Exception object can be thrown with an error message.", - "types": [ - "\\Exception" - ] - }, - { - "name": "param", - "content": "Holds context for the payment, including order ID and payment method.", - "types": [ - "\\Automattic\\WooCommerce\\StoreApi\\Payments\\PaymentContext" - ], - "variable": "$context" - }, - { - "name": "param", - "content": "Result object for the transaction.", - "types": [ - "\\Automattic\\WooCommerce\\StoreApi\\Payments\\PaymentResult" - ], - "variable": "$payment_result" - } - ], - "long_description_html": "" - }, - "args": 1 - }, - { - "name": "woocommerce_shop_loop", - "file": "BlockTypes/ClassicTemplate.php", - "type": "action", - "doc": { - "description": "Hook: woocommerce_shop_loop.", - "long_description": "", - "tags": [], - "long_description_html": "" - }, - "args": 0 - }, - { - "name": "woocommerce_store_api_cart_errors", - "file": "StoreApi/Utilities/CartController.php", - "type": "action", - "doc": { - "description": "Fires an action to validate the cart.", - "long_description": "Functions hooking into this should add custom errors using the provided WP_Error instance.", - "tags": [ - { - "name": "example", - "content": "docs/examples/validate-cart.md" - }, - { - "name": "param", - "content": "WP_Error object.", - "types": [ - "\\WP_Error" - ], - "variable": "$errors" - }, - { - "name": "param", - "content": "Cart object.", - "types": [ - "\\WC_Cart" - ], - "variable": "$cart" - } - ], - "long_description_html": "Functions hooking into this should add custom errors using the provided WP_Error instance.
" - }, - "args": 2 - }, - { - "name": "woocommerce_store_api_cart_update_customer_from_request", - "file": "StoreApi/Routes/V1/CartUpdateCustomer.php", - "type": "action", - "doc": { - "description": "Fires when the Checkout Block/Store API updates a customer from the API request data.", - "long_description": "", - "tags": [ - { - "name": "param", - "content": "Customer object.", - "types": [ - "\\WC_Customer" - ], - "variable": "$customer" - }, - { - "name": "param", - "content": "Full details about the request.", - "types": [ - "\\WP_REST_Request" - ], - "variable": "$request" - } - ], - "long_description_html": "" - }, - "args": 2 - }, - { - "name": "woocommerce_store_api_cart_update_order_from_request", - "file": "StoreApi/Routes/V1/AbstractCartRoute.php", - "type": "action", - "doc": { - "description": "Fires when the order is synced with cart data from a cart route.", - "long_description": "", - "tags": [ - { - "name": "param", - "content": "Order object.", - "types": [ - "\\WC_Order" - ], - "variable": "$draft_order" - }, - { - "name": "param", - "content": "Customer object.", - "types": [ - "\\WC_Customer" - ], - "variable": "$customer" - }, - { - "name": "param", - "content": "Full details about the request.", - "types": [ - "\\WP_REST_Request" - ], - "variable": "$request" - } - ], - "long_description_html": "" - }, - "args": 2 - }, - { - "name": "woocommerce_store_api_checkout_order_processed", - "file": "StoreApi/Routes/V1/Checkout.php", - "type": "action", - "doc": { - "description": "Fires before an order is processed by the Checkout Block/Store API.", - "long_description": "This hook informs extensions that $order has completed processing and is ready for payment.\n This is similar to existing core hook woocommerce_checkout_order_processed. We're using a new action: - To keep the interface focused (only pass $order, not passing request data). - This also explicitly indicates these orders are from checkout block/StoreAPI.", - "tags": [ - { - "name": "see", - "content": "", - "refers": "https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/3238" - }, - { - "name": "example", - "content": "docs/examples/checkout-order-processed.md" - }, - { - "name": "param", - "content": "Order object.", - "types": [ - "\\WC_Order" - ], - "variable": "$order" - } - ], - "long_description_html": "This hook informs extensions that $order has completed processing and is ready for payment.
This is similar to existing core hook woocommerce_checkout_order_processed. We're using a new action:
This hook gives extensions the chance to update orders based on the data in the request. This can be used in conjunction with the ExtendSchema class to post custom data and then process it.
" - }, - "args": 2 - }, - { - "name": "woocommerce_store_api_checkout_update_order_meta", - "file": "StoreApi/Routes/V1/Checkout.php", - "type": "action", - "doc": { - "description": "Fires when the Checkout Block/Store API updates an order's meta data.", - "long_description": "This hook gives extensions the chance to add or update meta data on the $order. Throwing an exception from a callback attached to this action will make the Checkout Block render in a warning state, effectively preventing checkout.\n This is similar to existing core hook woocommerce_checkout_update_order_meta. We're using a new action: - To keep the interface focused (only pass $order, not passing request data). - This also explicitly indicates these orders are from checkout block/StoreAPI.", - "tags": [ - { - "name": "see", - "content": "", - "refers": "https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/3686" - }, - { - "name": "param", - "content": "Order object.", - "types": [ - "\\WC_Order" - ], - "variable": "$order" - } - ], - "long_description_html": "This hook gives extensions the chance to add or update meta data on the $order. Throwing an exception from a callback attached to this action will make the Checkout Block render in a warning state, effectively preventing checkout.
This is similar to existing core hook woocommerce_checkout_update_order_meta. We're using a new action:
Fire action to validate add to cart. Functions hooking into this should throw an \\Exception to prevent add to cart from happening.
" - }, - "args": 2 - }, - { - "name": "woocommerce_store_api_validate_cart_item", - "file": "StoreApi/Utilities/CartController.php", - "type": "action", - "doc": { - "description": "Fire action to validate add to cart. Functions hooking into this should throw an \\Exception to prevent add to cart from occurring.", - "long_description": "", - "tags": [ - { - "name": "param", - "content": "Product object being added to the cart.", - "types": [ - "\\WC_Product" - ], - "variable": "$product" - }, - { - "name": "param", - "content": "Cart item array.", - "types": [ - "array" - ], - "variable": "$cart_item" - } - ], - "long_description_html": "" - }, - "args": 2 - } - ] -} \ No newline at end of file + "$schema": "https://raw.githubusercontent.com/johnbillion/wp-hooks-generator/0.7.3/schema.json", + "hooks": [ + { + "name": "woocommerce_add_to_cart", + "file": "StoreApi/Utilities/CartController.php", + "type": "action", + "doc": { + "description": "Fires when an item is added to the cart.", + "long_description": "This hook fires when an item is added to the cart. This is triggered from the Store API in this context, but WooCommerce core add to cart events trigger the same hook.", + "tags": [ + { + "name": "internal", + "content": "Matches action name in WooCommerce core." + }, + { + "name": "param", + "content": "ID of the item in the cart.", + "types": [ "string" ], + "variable": "$cart_id" + }, + { + "name": "param", + "content": "ID of the product added to the cart.", + "types": [ "integer" ], + "variable": "$product_id" + }, + { + "name": "param", + "content": "Quantity of the item added to the cart.", + "types": [ "integer" ], + "variable": "$request_quantity" + }, + { + "name": "param", + "content": "Variation ID of the product added to the cart.", + "types": [ "integer" ], + "variable": "$variation_id" + }, + { + "name": "param", + "content": "Array of variation data.", + "types": [ "array" ], + "variable": "$variation" + }, + { + "name": "param", + "content": "Array of other cart item data.", + "types": [ "array" ], + "variable": "$cart_item_data" + } + ], + "long_description_html": "This hook fires when an item is added to the cart. This is triggered from the Store API in this context, but WooCommerce core add to cart events trigger the same hook.
" + }, + "args": 6 + }, + { + "name": "woocommerce_after_main_content", + "file": "BlockTypes/ClassicTemplate.php", + "type": "action", + "doc": { + "description": "Hook: woocommerce_after_main_content", + "long_description": "Called after rendering the main content for a product.", + "tags": [ + { + "name": "see", + "content": "Outputs closing DIV for the content (priority 10)", + "refers": "woocommerce_output_content_wrapper_end()" + } + ], + "long_description_html": "Called after rendering the main content for a product.
" + }, + "args": 0 + }, + { + "name": "woocommerce_after_main_content", + "file": "BlockTypes/ClassicTemplate.php", + "type": "action", + "doc": { + "description": "Hook: woocommerce_after_main_content", + "long_description": "Called after rendering the main content for a product.", + "tags": [ + { + "name": "see", + "content": "Outputs closing DIV for the content (priority 10)", + "refers": "woocommerce_output_content_wrapper_end()" + } + ], + "long_description_html": "Called after rendering the main content for a product.
" + }, + "args": 0 + }, + { + "name": "woocommerce_after_shop_loop", + "file": "BlockTypes/ClassicTemplate.php", + "type": "action", + "doc": { + "description": "Hook: woocommerce_after_shop_loop.", + "long_description": "", + "tags": [ + { + "name": "see", + "content": "Renders pagination (priority 10)", + "refers": "woocommerce_pagination()" + } + ], + "long_description_html": "" + }, + "args": 0 + }, + { + "name": "woocommerce_applied_coupon", + "file": "StoreApi/Utilities/CartController.php", + "type": "action", + "doc": { + "description": "Fires after a coupon has been applied to the cart.", + "long_description": "", + "tags": [ + { + "name": "internal", + "content": "Matches action name in WooCommerce core." + }, + { + "name": "param", + "content": "The coupon code that was applied.", + "types": [ "string" ], + "variable": "$coupon_code" + } + ], + "long_description_html": "" + }, + "args": 1 + }, + { + "name": "woocommerce_archive_description", + "file": "BlockTypes/ClassicTemplate.php", + "type": "action", + "doc": { + "description": "Hook: woocommerce_archive_description.", + "long_description": "", + "tags": [ + { + "name": "see", + "content": "Renders the taxonomy archive description (priority 10)", + "refers": "woocommerce_taxonomy_archive_description()" + }, + { + "name": "see", + "content": "Renders the product archive description (priority 10)", + "refers": "woocommerce_product_archive_description()" + } + ], + "long_description_html": "" + }, + "args": 0 + }, + { + "name": "woocommerce_before_main_content", + "file": "BlockTypes/ClassicTemplate.php", + "type": "action", + "doc": { + "description": "Hook: woocommerce_before_main_content", + "long_description": "Called before rendering the main content for a product.", + "tags": [ + { + "name": "see", + "content": "Outputs opening DIV for the content (priority 10)", + "refers": "woocommerce_output_content_wrapper()" + }, + { + "name": "see", + "content": "Outputs breadcrumb trail to the current product (priority 20)", + "refers": "woocommerce_breadcrumb()" + }, + { + "name": "see", + "content": "Outputs schema markup (priority 30)", + "refers": "WC_Structured_Data::generate_website_data()" + } + ], + "long_description_html": "Called before rendering the main content for a product.
" + }, + "args": 0 + }, + { + "name": "woocommerce_before_main_content", + "file": "BlockTypes/ClassicTemplate.php", + "type": "action", + "doc": { + "description": "Hook: woocommerce_before_main_content", + "long_description": "Called before rendering the main content for a product.", + "tags": [ + { + "name": "see", + "content": "Outputs opening DIV for the content (priority 10)", + "refers": "woocommerce_output_content_wrapper()" + }, + { + "name": "see", + "content": "Outputs breadcrumb trail to the current product (priority 20)", + "refers": "woocommerce_breadcrumb()" + }, + { + "name": "see", + "content": "Outputs schema markup (priority 30)", + "refers": "WC_Structured_Data::generate_website_data()" + } + ], + "long_description_html": "Called before rendering the main content for a product.
" + }, + "args": 0 + }, + { + "name": "woocommerce_before_shop_loop", + "file": "BlockTypes/ClassicTemplate.php", + "type": "action", + "doc": { + "description": "Hook: woocommerce_before_shop_loop.", + "long_description": "", + "tags": [ + { + "name": "see", + "content": "Render error notices (priority 10)", + "refers": "woocommerce_output_all_notices()" + }, + { + "name": "see", + "content": "Show number of results found (priority 20)", + "refers": "woocommerce_result_count()" + }, + { + "name": "see", + "content": "Show form to control sort order (priority 30)", + "refers": "woocommerce_catalog_ordering()" + } + ], + "long_description_html": "" + }, + "args": 0 + }, + { + "name": "woocommerce_blocks_cart_enqueue_data", + "file": "BlockTypes/MiniCart.php", + "type": "action", + "doc": { + "description": "Fires after cart block data is registered.", + "long_description": "", + "tags": [], + "long_description_html": "" + }, + "args": 0 + }, + { + "name": "woocommerce_blocks_cart_enqueue_data", + "file": "BlockTypes/Cart.php", + "type": "action", + "doc": { + "description": "Fires after cart block data is registered.", + "long_description": "", + "tags": [], + "long_description_html": "" + }, + "args": 0 + }, + { + "name": "woocommerce_blocks_checkout_enqueue_data", + "file": "BlockTypes/Checkout.php", + "type": "action", + "doc": { + "description": "Fires after checkout block data is registered.", + "long_description": "", + "tags": [], + "long_description_html": "" + }, + "args": 0 + }, + { + "name": "woocommerce_blocks_enqueue_cart_block_scripts_after", + "file": "BlockTypes/Cart.php", + "type": "action", + "doc": { + "description": "Fires after cart block scripts are enqueued.", + "long_description": "", + "tags": [], + "long_description_html": "" + }, + "args": 0 + }, + { + "name": "woocommerce_blocks_enqueue_cart_block_scripts_before", + "file": "BlockTypes/Cart.php", + "type": "action", + "doc": { + "description": "Fires before cart block scripts are enqueued.", + "long_description": "", + "tags": [], + "long_description_html": "" + }, + "args": 0 + }, + { + "name": "woocommerce_blocks_enqueue_checkout_block_scripts_after", + "file": "BlockTypes/Checkout.php", + "type": "action", + "doc": { + "description": "Fires after checkout block scripts are enqueued.", + "long_description": "", + "tags": [], + "long_description_html": "" + }, + "args": 0 + }, + { + "name": "woocommerce_blocks_enqueue_checkout_block_scripts_before", + "file": "BlockTypes/Checkout.php", + "type": "action", + "doc": { + "description": "Fires before checkout block scripts are enqueued.", + "long_description": "", + "tags": [], + "long_description_html": "" + }, + "args": 0 + }, + { + "name": "woocommerce_blocks_{$this->registry_identifier}_registration", + "file": "Integrations/IntegrationRegistry.php", + "type": "action", + "doc": { + "description": "Fires when the IntegrationRegistry is initialized.", + "long_description": "Runs before integrations are initialized allowing new integration to be registered for use. This should be used as the primary hook for integrations to include their scripts, styles, and other code extending the blocks.", + "tags": [ + { + "name": "param", + "content": "Instance of the IntegrationRegistry class which exposes the IntegrationRegistry::register() method.", + "types": [ + "\\Automattic\\WooCommerce\\Blocks\\Integrations\\IntegrationRegistry" + ], + "variable": "$this" + } + ], + "long_description_html": "Runs before integrations are initialized allowing new integration to be registered for use. This should be used as the primary hook for integrations to include their scripts, styles, and other code extending the blocks.
" + }, + "args": 1 + }, + { + "name": "woocommerce_check_cart_items", + "file": "StoreApi/Utilities/CartController.php", + "type": "action", + "doc": { + "description": "Fires when cart items are being validated.", + "long_description": "Allow 3rd parties to validate cart items. This is a legacy hook from Woo core. This filter will be deprecated because it encourages usage of wc_add_notice. For the API we need to capture notices and convert to wp errors instead.", + "tags": [ + { + "name": "deprecated", + "content": "" + }, + { + "name": "internal", + "content": "Matches action name in WooCommerce core." + } + ], + "long_description_html": "Allow 3rd parties to validate cart items. This is a legacy hook from Woo core. This filter will be deprecated because it encourages usage of wc_add_notice. For the API we need to capture notices and convert to wp errors instead.
" + }, + "args": 0 + }, + { + "name": "woocommerce_created_customer", + "file": "StoreApi/Routes/V1/Checkout.php", + "type": "action", + "doc": { + "description": "Fires after a customer account has been registered.", + "long_description": "This hook fires after customer accounts are created and passes the customer data.", + "tags": [ + { + "name": "internal", + "content": "Matches filter name in WooCommerce core." + }, + { + "name": "param", + "content": "New customer (user) ID.", + "types": [ "integer" ], + "variable": "$customer_id" + }, + { + "name": "param", + "content": "Array of customer (user) data.", + "types": [ "array" ], + "variable": "$new_customer_data" + }, + { + "name": "param", + "content": "The generated password for the account.", + "types": [ "string" ], + "variable": "$password_generated" + } + ], + "long_description_html": "This hook fires after customer accounts are created and passes the customer data.
" + }, + "args": 3 + }, + { + "name": "woocommerce_no_products_found", + "file": "BlockTypes/ClassicTemplate.php", + "type": "action", + "doc": { + "description": "Hook: woocommerce_no_products_found.", + "long_description": "", + "tags": [ + { + "name": "see", + "content": "Default no products found content (priority 10)", + "refers": "wc_no_products_found()" + } + ], + "long_description_html": "" + }, + "args": 0 + }, + { + "name": "woocommerce_register_post", + "file": "StoreApi/Routes/V1/Checkout.php", + "type": "action", + "doc": { + "description": "Fires before a customer account is registered.", + "long_description": "This hook fires before customer accounts are created and passes the form data (username, email) and an array of errors.\n This could be used to add extra validation logic and append errors to the array.", + "tags": [ + { + "name": "internal", + "content": "Matches filter name in WooCommerce core." + }, + { + "name": "param", + "content": "Customer username.", + "types": [ "string" ], + "variable": "$username" + }, + { + "name": "param", + "content": "Customer email address.", + "types": [ "string" ], + "variable": "$user_email" + }, + { + "name": "param", + "content": "Error object.", + "types": [ "\\WP_Error" ], + "variable": "$errors" + } + ], + "long_description_html": "This hook fires before customer accounts are created and passes the form data (username, email) and an array of errors.
This could be used to add extra validation logic and append errors to the array.
" + }, + "args": 3 + }, + { + "name": "woocommerce_rest_checkout_process_payment_with_context", + "file": "StoreApi/Routes/V1/Checkout.php", + "type": "action_reference", + "doc": { + "description": "Process payment with context.", + "long_description": "", + "tags": [ + { + "name": "hook", + "content": "woocommerce_rest_checkout_process_payment_with_context" + }, + { + "name": "throws", + "content": "If there is an error taking payment, an \\Exception object can be thrown with an error message.", + "types": [ "\\Exception" ] + }, + { + "name": "param", + "content": "Holds context for the payment, including order ID and payment method.", + "types": [ + "\\Automattic\\WooCommerce\\StoreApi\\Payments\\PaymentContext" + ], + "variable": "$context" + }, + { + "name": "param", + "content": "Result object for the transaction.", + "types": [ + "\\Automattic\\WooCommerce\\StoreApi\\Payments\\PaymentResult" + ], + "variable": "$payment_result" + } + ], + "long_description_html": "" + }, + "args": 1 + }, + { + "name": "woocommerce_shop_loop", + "file": "BlockTypes/ClassicTemplate.php", + "type": "action", + "doc": { + "description": "Hook: woocommerce_shop_loop.", + "long_description": "", + "tags": [], + "long_description_html": "" + }, + "args": 0 + }, + { + "name": "woocommerce_store_api_cart_errors", + "file": "StoreApi/Utilities/CartController.php", + "type": "action", + "doc": { + "description": "Fires an action to validate the cart.", + "long_description": "Functions hooking into this should add custom errors using the provided WP_Error instance.", + "tags": [ + { + "name": "example", + "content": "docs/examples/validate-cart.md" + }, + { + "name": "param", + "content": "WP_Error object.", + "types": [ "\\WP_Error" ], + "variable": "$errors" + }, + { + "name": "param", + "content": "Cart object.", + "types": [ "\\WC_Cart" ], + "variable": "$cart" + } + ], + "long_description_html": "Functions hooking into this should add custom errors using the provided WP_Error instance.
" + }, + "args": 2 + }, + { + "name": "woocommerce_store_api_cart_update_customer_from_request", + "file": "StoreApi/Routes/V1/CartUpdateCustomer.php", + "type": "action", + "doc": { + "description": "Fires when the Checkout Block/Store API updates a customer from the API request data.", + "long_description": "", + "tags": [ + { + "name": "param", + "content": "Customer object.", + "types": [ "\\WC_Customer" ], + "variable": "$customer" + }, + { + "name": "param", + "content": "Full details about the request.", + "types": [ "\\WP_REST_Request" ], + "variable": "$request" + } + ], + "long_description_html": "" + }, + "args": 2 + }, + { + "name": "woocommerce_store_api_cart_update_order_from_request", + "file": "StoreApi/Routes/V1/AbstractCartRoute.php", + "type": "action", + "doc": { + "description": "Fires when the order is synced with cart data from a cart route.", + "long_description": "", + "tags": [ + { + "name": "param", + "content": "Order object.", + "types": [ "\\WC_Order" ], + "variable": "$draft_order" + }, + { + "name": "param", + "content": "Customer object.", + "types": [ "\\WC_Customer" ], + "variable": "$customer" + }, + { + "name": "param", + "content": "Full details about the request.", + "types": [ "\\WP_REST_Request" ], + "variable": "$request" + } + ], + "long_description_html": "" + }, + "args": 2 + }, + { + "name": "woocommerce_store_api_checkout_order_processed", + "file": "StoreApi/Routes/V1/Checkout.php", + "type": "action", + "doc": { + "description": "Fires before an order is processed by the Checkout Block/Store API.", + "long_description": "This hook informs extensions that $order has completed processing and is ready for payment.\n This is similar to existing core hook woocommerce_checkout_order_processed. We're using a new action: - To keep the interface focused (only pass $order, not passing request data). - This also explicitly indicates these orders are from checkout block/StoreAPI.", + "tags": [ + { + "name": "see", + "content": "", + "refers": "https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/3238" + }, + { + "name": "example", + "content": "docs/examples/checkout-order-processed.md" + }, + { + "name": "param", + "content": "Order object.", + "types": [ "\\WC_Order" ], + "variable": "$order" + } + ], + "long_description_html": "This hook informs extensions that $order has completed processing and is ready for payment.
This is similar to existing core hook woocommerce_checkout_order_processed. We're using a new action:
This hook gives extensions the chance to update orders based on the data in the request. This can be used in conjunction with the ExtendSchema class to post custom data and then process it.
" + }, + "args": 2 + }, + { + "name": "woocommerce_store_api_checkout_update_order_meta", + "file": "StoreApi/Routes/V1/Checkout.php", + "type": "action", + "doc": { + "description": "Fires when the Checkout Block/Store API updates an order's meta data.", + "long_description": "This hook gives extensions the chance to add or update meta data on the $order. Throwing an exception from a callback attached to this action will make the Checkout Block render in a warning state, effectively preventing checkout.\n This is similar to existing core hook woocommerce_checkout_update_order_meta. We're using a new action: - To keep the interface focused (only pass $order, not passing request data). - This also explicitly indicates these orders are from checkout block/StoreAPI.", + "tags": [ + { + "name": "see", + "content": "", + "refers": "https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/3686" + }, + { + "name": "param", + "content": "Order object.", + "types": [ "\\WC_Order" ], + "variable": "$order" + } + ], + "long_description_html": "This hook gives extensions the chance to add or update meta data on the $order. Throwing an exception from a callback attached to this action will make the Checkout Block render in a warning state, effectively preventing checkout.
This is similar to existing core hook woocommerce_checkout_update_order_meta. We're using a new action:
Fire action to validate add to cart. Functions hooking into this should throw an \\Exception to prevent add to cart from happening.
" + }, + "args": 2 + }, + { + "name": "woocommerce_store_api_validate_cart_item", + "file": "StoreApi/Utilities/CartController.php", + "type": "action", + "doc": { + "description": "Fire action to validate add to cart. Functions hooking into this should throw an \\Exception to prevent add to cart from occurring.", + "long_description": "", + "tags": [ + { + "name": "param", + "content": "Product object being added to the cart.", + "types": [ "\\WC_Product" ], + "variable": "$product" + }, + { + "name": "param", + "content": "Cart item array.", + "types": [ "array" ], + "variable": "$cart_item" + } + ], + "long_description_html": "" + }, + "args": 2 + } + ] +} diff --git a/bin/hook-docs/data/filters.json b/bin/hook-docs/data/filters.json index d1d57008517..e2efdd482aa 100644 --- a/bin/hook-docs/data/filters.json +++ b/bin/hook-docs/data/filters.json @@ -1,1011 +1,854 @@ { - "$schema": "https://raw.githubusercontent.com/johnbillion/wp-hooks-generator/0.7.3/schema.json", - "hooks": [ - { - "name": "__experimental_woocommerce_blocks_add_data_attributes_to_block", - "file": "BlockTypesController.php", - "type": "filter", - "doc": { - "description": "Filters the list of allowed Block Names", - "long_description": "This hook defines which block names should have block name and attribute data- attributes appended on render.", - "tags": [ - { - "name": "param", - "content": "List of namespaces.", - "types": [ - "array" - ], - "variable": "$allowed_namespaces" - } - ], - "long_description_html": "This hook defines which block names should have block name and attribute data- attributes appended on render.
" - }, - "args": 1 - }, - { - "name": "__experimental_woocommerce_blocks_add_data_attributes_to_namespace", - "file": "BlockTypesController.php", - "type": "filter", - "doc": { - "description": "Filters the list of allowed block namespaces.", - "long_description": "This hook defines which block namespaces should have block name and attribute `data-` attributes appended on render.", - "tags": [ - { - "name": "param", - "content": "List of namespaces.", - "types": [ - "array" - ], - "variable": "$allowed_namespaces" - } - ], - "long_description_html": "This hook defines which block namespaces should have block name and attribute data-
attributes appended on render.
Allow 3rd parties to validate if an item can be added to the cart. This is a legacy hook from Woo core. This filter will be deprecated because it encourages usage of wc_add_notice. For the API we need to capture notices and convert to exceptions instead.
" - }, - "args": 5 - }, - { - "name": "woocommerce_adjust_non_base_location_prices", - "file": "StoreApi/Utilities/ProductQuery.php", - "type": "filter", - "doc": { - "description": "Filters if taxes should be removed from locations outside the store base location.", - "long_description": "The woocommerce_adjust_non_base_location_prices filter can stop base taxes being taken off when dealing with out of base locations. e.g. If a product costs 10 including tax, all users will pay 10 regardless of location and taxes.", - "tags": [ - { - "name": "internal", - "content": "Matches filter name in WooCommerce core." - }, - { - "name": "param", - "content": "True by default.", - "types": [ - "boolean" - ], - "variable": "$adjust_non_base_location_prices" - }, - { - "name": "return", - "content": "", - "types": [ - "boolean" - ] - } - ], - "long_description_html": "The woocommerce_adjust_non_base_location_prices filter can stop base taxes being taken off when dealing with out of base locations. e.g. If a product costs 10 including tax, all users will pay 10 regardless of location and taxes.
" - }, - "args": 1 - }, - { - "name": "woocommerce_admin_disabled", - "file": "InboxNotifications.php", - "type": "filter", - "doc": { - "description": "", - "long_description": "", - "tags": [], - "long_description_html": "" - }, - "args": 1 - }, - { - "name": "woocommerce_apply_individual_use_coupon", - "file": "StoreApi/Utilities/CartController.php", - "type": "filter", - "doc": { - "description": "Filter coupons to remove when applying an individual use coupon.", - "long_description": "", - "tags": [ - { - "name": "internal", - "content": "Matches filter name in WooCommerce core." - }, - { - "name": "param", - "content": "Array of coupons to remove from the cart.", - "types": [ - "array" - ], - "variable": "$coupons" - }, - { - "name": "param", - "content": "Coupon object applied to the cart.", - "types": [ - "\\WC_Coupon" - ], - "variable": "$coupon" - }, - { - "name": "param", - "content": "Array of applied coupons already applied to the cart.", - "types": [ - "array" - ], - "variable": "$applied_coupons" - }, - { - "name": "return", - "content": "", - "types": [ - "array" - ] - } - ], - "long_description_html": "" - }, - "args": 3 - }, - { - "name": "woocommerce_apply_with_individual_use_coupon", - "file": "StoreApi/Utilities/CartController.php", - "type": "filter", - "doc": { - "description": "Filters if a coupon can be applied alongside other individual use coupons.", - "long_description": "", - "tags": [ - { - "name": "internal", - "content": "Matches filter name in WooCommerce core." - }, - { - "name": "param", - "content": "Defaults to false.", - "types": [ - "boolean" - ], - "variable": "$apply_with_individual_use_coupon" - }, - { - "name": "param", - "content": "Coupon object applied to the cart.", - "types": [ - "\\WC_Coupon" - ], - "variable": "$coupon" - }, - { - "name": "param", - "content": "Individual use coupon already applied to the cart.", - "types": [ - "\\WC_Coupon" - ], - "variable": "$individual_use_coupon" - }, - { - "name": "param", - "content": "Array of applied coupons already applied to the cart.", - "types": [ - "array" - ], - "variable": "$applied_coupons" - }, - { - "name": "return", - "content": "", - "types": [ - "boolean" - ] - } - ], - "long_description_html": "" - }, - "args": 4 - }, - { - "name": "woocommerce_blocks_product_grid_is_cacheable", - "file": "BlockTypes/AbstractProductGrid.php", - "type": "filter", - "doc": { - "description": "Filters whether or not the product grid is cacheable.", - "long_description": "", - "tags": [ - { - "name": "param", - "content": "The list of script dependencies.", - "types": [ - "boolean" - ], - "variable": "$is_cacheable" - }, - { - "name": "param", - "content": "Query args for the products query passed to BlocksWpQuery.", - "types": [ - "array" - ], - "variable": "$query_args" - }, - { - "name": "return", - "content": "True to enable cache, false to disable cache.", - "types": [ - "array" - ] - } - ], - "long_description_html": "" - }, - "args": 2 - }, - { - "name": "woocommerce_blocks_product_grid_item_html", - "file": "BlockTypes/AbstractProductGrid.php", - "type": "filter", - "doc": { - "description": "Filters the HTML for products in the grid.", - "long_description": "", - "tags": [ - { - "name": "param", - "content": "Product grid item HTML.", - "types": [ - "string" - ], - "variable": "$html" - }, - { - "name": "param", - "content": "Product data passed to the template.", - "types": [ - "array" - ], - "variable": "$data" - }, - { - "name": "param", - "content": "Product object.", - "types": [ - "\\WC_Product" - ], - "variable": "$product" - }, - { - "name": "return", - "content": "Updated product grid item HTML.", - "types": [ - "string" - ] - } - ], - "long_description_html": "" - }, - "args": 3 - }, - { - "name": "woocommerce_blocks_register_script_dependencies", - "file": "Assets/Api.php", - "type": "filter", - "doc": { - "description": "Filters the list of script dependencies.", - "long_description": "", - "tags": [ - { - "name": "param", - "content": "The list of script dependencies.", - "types": [ - "array" - ], - "variable": "$dependencies" - }, - { - "name": "param", - "content": "The script's handle.", - "types": [ - "string" - ], - "variable": "$handle" - }, - { - "name": "return", - "content": "", - "types": [ - "array" - ] - } - ], - "long_description_html": "" - }, - "args": 2 - }, - { - "name": "woocommerce_cart_contents_changed", - "file": "StoreApi/Utilities/CartController.php", - "type": "filter", - "doc": { - "description": "Filters the entire cart contents when the cart changes.", - "long_description": "", - "tags": [ - { - "name": "internal", - "content": "Matches filter name in WooCommerce core." - }, - { - "name": "param", - "content": "Array of all cart items.", - "types": [ - "array" - ], - "variable": "$cart_contents" - }, - { - "name": "return", - "content": "Updated array of all cart items.", - "types": [ - "array" - ] - } - ], - "long_description_html": "" - }, - "args": 1 - }, - { - "name": "woocommerce_ga_disable_tracking", - "file": "Domain/Services/GoogleAnalytics.php", - "type": "filter", - "doc": { - "description": "Filter to disable Google Analytics tracking.", - "long_description": "", - "tags": [ - { - "name": "internal", - "content": "Matches filter name in GA extension." - }, - { - "name": "param", - "content": "If true, tracking will be disabled.", - "types": [ - "boolean" - ], - "variable": "$disable_tracking" - } - ], - "long_description_html": "" - }, - "args": 1 - }, - { - "name": "woocommerce_get_item_data", - "file": "StoreApi/Schemas/V1/CartItemSchema.php", - "type": "filter", - "doc": { - "description": "Filters cart item data.", - "long_description": "Filters the variation option name for custom option slugs.", - "tags": [ - { - "name": "internal", - "content": "Matches filter name in WooCommerce core." - }, - { - "name": "param", - "content": "Cart item data. Empty by default.", - "types": [ - "array" - ], - "variable": "$item_data" - }, - { - "name": "param", - "content": "Cart item array.", - "types": [ - "array" - ], - "variable": "$cart_item" - }, - { - "name": "return", - "content": "", - "types": [ - "array" - ] - } - ], - "long_description_html": "Filters the variation option name for custom option slugs.
" - }, - "args": 2 - }, - { - "name": "woocommerce_new_customer_data", - "file": "StoreApi/Routes/V1/Checkout.php", - "type": "filter", - "doc": { - "description": "Filters customer data before a customer account is registered.", - "long_description": "This hook filters customer data. It allows user data to be changed, for example, username, password, email, first name, last name, and role.", - "tags": [ - { - "name": "param", - "content": "An array of customer (user) data.", - "types": [ - "array" - ], - "variable": "$customer_data" - }, - { - "name": "return", - "content": "", - "types": [ - "array" - ] - } - ], - "long_description_html": "This hook filters customer data. It allows user data to be changed, for example, username, password, email, first name, last name, and role.
" - }, - "args": 1 - }, - { - "name": "woocommerce_registration_errors", - "file": "StoreApi/Routes/V1/Checkout.php", - "type": "filter", - "doc": { - "description": "Filters registration errors before a customer account is registered.", - "long_description": "This hook filters registration errors. This can be used to manipulate the array of errors before they are displayed.", - "tags": [ - { - "name": "internal", - "content": "Matches filter name in WooCommerce core." - }, - { - "name": "param", - "content": "Error object.", - "types": [ - "\\WP_Error" - ], - "variable": "$errors" - }, - { - "name": "param", - "content": "Customer username.", - "types": [ - "string" - ], - "variable": "$username" - }, - { - "name": "param", - "content": "Customer email address.", - "types": [ - "string" - ], - "variable": "$user_email" - }, - { - "name": "return", - "content": "", - "types": [ - "\\WP_Error" - ] - } - ], - "long_description_html": "This hook filters registration errors. This can be used to manipulate the array of errors before they are displayed.
" - }, - "args": 3 - }, - { - "name": "woocommerce_shared_settings", - "file": "Assets/AssetDataRegistry.php", - "type": "filter", - "doc": { - "description": "Filters the array of shared settings.", - "long_description": "Low level hook for registration of new data late in the cycle. This is deprecated. Instead, use the data api:\n ```php Automattic\\WooCommerce\\Blocks\\Package::container()->get( Automattic\\WooCommerce\\Blocks\\Assets\\AssetDataRegistry::class )->add( $key, $value ) ```", - "tags": [ - { - "name": "deprecated", - "content": "" - }, - { - "name": "param", - "content": "Settings data.", - "types": [ - "array" - ], - "variable": "$data" - }, - { - "name": "return", - "content": "", - "types": [ - "array" - ] - } - ], - "long_description_html": "Low level hook for registration of new data late in the cycle. This is deprecated. Instead, use the data api:
Automattic\\WooCommerce\\Blocks\\Package::container()->get( Automattic\\WooCommerce\\Blocks\\Assets\\AssetDataRegistry::class )->add( $key, $value )
"
- },
- "args": 1
- },
- {
- "name": "woocommerce_shipping_package_name",
- "file": "StoreApi/Utilities/CartController.php",
- "type": "filter",
- "doc": {
- "description": "Filters the shipping package name.",
- "long_description": "",
- "tags": [
- {
- "name": "internal",
- "content": "Matches filter name in WooCommerce core."
- },
- {
- "name": "param",
- "content": "Shipping package name.",
- "types": [
- "string"
- ],
- "variable": "$shipping_package_name"
- },
- {
- "name": "param",
- "content": "Shipping package ID.",
- "types": [
- "string"
- ],
- "variable": "$package_id"
- },
- {
- "name": "param",
- "content": "Shipping package from WooCommerce.",
- "types": [
- "array"
- ],
- "variable": "$package"
- },
- {
- "name": "return",
- "content": "Shipping package name.",
- "types": [
- "string"
- ]
- }
- ],
- "long_description_html": ""
- },
- "args": 3
- },
- {
- "name": "woocommerce_show_page_title",
- "file": "BlockTypes/ClassicTemplate.php",
- "type": "filter",
- "doc": {
- "description": "We need to load the scripts here because when using block templates wp_head() gets run after the block template. As a result we are trying to enqueue required scripts before we have even registered them.",
- "long_description": "",
- "tags": [
- {
- "name": "see",
- "content": "",
- "refers": "https://github.com/woocommerce/woocommerce-gutenberg-products-block/issues/5328#issuecomment-989013447"
- }
- ],
- "long_description_html": ""
- },
- "args": 1
- },
- {
- "name": "woocommerce_store_api_disable_nonce_check",
- "file": "StoreApi/Routes/V1/AbstractCartRoute.php",
- "type": "filter",
- "doc": {
- "description": "Filters the Store API nonce check.",
- "long_description": "This can be used to disable the nonce check when testing API endpoints via a REST API client.",
- "tags": [
- {
- "name": "param",
- "content": "If true, nonce checks will be disabled.",
- "types": [
- "boolean"
- ],
- "variable": "$disable_nonce_check"
- },
- {
- "name": "return",
- "content": "",
- "types": [
- "boolean"
- ]
- }
- ],
- "long_description_html": "This can be used to disable the nonce check when testing API endpoints via a REST API client.
" - }, - "args": 1 - }, - { - "name": "woocommerce_store_api_product_quantity_limit", - "file": "StoreApi/Utilities/QuantityLimits.php", - "type": "filter", - "doc": { - "description": "Filters the quantity limit for a product being added to the cart via the Store API.", - "long_description": "Filters the variation option name for custom option slugs.", - "tags": [ - { - "name": "param", - "content": "Quantity limit which defaults to 9999 unless sold individually.", - "types": [ - "integer" - ], - "variable": "$quantity_limit" - }, - { - "name": "param", - "content": "Product instance.", - "types": [ - "\\WC_Product" - ], - "variable": "$product" - }, - { - "name": "return", - "content": "", - "types": [ - "integer" - ] - } - ], - "long_description_html": "Filters the variation option name for custom option slugs.
" - }, - "args": 2 - }, - { - "name": "woocommerce_store_api_product_quantity_{$value_type}", - "file": "StoreApi/Utilities/QuantityLimits.php", - "type": "filter", - "doc": { - "description": "Filters the quantity minimum for a cart item in Store API. This allows extensions to control the minimum qty of items already within the cart.", - "long_description": "The suffix of the hook will vary depending on the value being filtered. For example, minimum, maximum, multiple_of, editable.", - "tags": [ - { - "name": "param", - "content": "The value being filtered.", - "types": [ - "mixed" - ], - "variable": "$value" - }, - { - "name": "param", - "content": "The product object.", - "types": [ - "\\WC_Product" - ], - "variable": "$product" - }, - { - "name": "param", - "content": "The cart item if the product exists in the cart, or null.", - "types": [ - "array", - "null" - ], - "variable": "$cart_item" - }, - { - "name": "return", - "content": "", - "types": [ - "mixed" - ] - } - ], - "long_description_html": "The suffix of the hook will vary depending on the value being filtered. For example, minimum, maximum, multiple_of, editable.
" - }, - "args": 3 - }, - { - "name": "woocommerce_variation_option_name", - "file": "StoreApi/Schemas/V1/CartItemSchema.php", - "type": "filter", - "doc": { - "description": "Filters the variation option name.", - "long_description": "Filters the variation option name for custom option slugs.", - "tags": [ - { - "name": "internal", - "content": "Matches filter name in WooCommerce core." - }, - { - "name": "param", - "content": "The name to display.", - "types": [ - "string" - ], - "variable": "$value" - }, - { - "name": "param", - "content": "Unused because this is not a variation taxonomy.", - "types": [ - "null" - ], - "variable": "$unused" - }, - { - "name": "param", - "content": "Taxonomy or product attribute name.", - "types": [ - "string" - ], - "variable": "$taxonomy" - }, - { - "name": "param", - "content": "Product data.", - "types": [ - "\\WC_Product" - ], - "variable": "$product" - }, - { - "name": "return", - "content": "", - "types": [ - "string" - ] - } - ], - "long_description_html": "Filters the variation option name for custom option slugs.
" - }, - "args": 4 - } - ] -} \ No newline at end of file + "$schema": "https://raw.githubusercontent.com/johnbillion/wp-hooks-generator/0.7.3/schema.json", + "hooks": [ + { + "name": "__experimental_woocommerce_blocks_add_data_attributes_to_block", + "file": "BlockTypesController.php", + "type": "filter", + "doc": { + "description": "Filters the list of allowed Block Names", + "long_description": "This hook defines which block names should have block name and attribute data- attributes appended on render.", + "tags": [ + { + "name": "param", + "content": "List of namespaces.", + "types": [ "array" ], + "variable": "$allowed_namespaces" + } + ], + "long_description_html": "This hook defines which block names should have block name and attribute data- attributes appended on render.
" + }, + "args": 1 + }, + { + "name": "__experimental_woocommerce_blocks_add_data_attributes_to_namespace", + "file": "BlockTypesController.php", + "type": "filter", + "doc": { + "description": "Filters the list of allowed block namespaces.", + "long_description": "This hook defines which block namespaces should have block name and attribute `data-` attributes appended on render.", + "tags": [ + { + "name": "param", + "content": "List of namespaces.", + "types": [ "array" ], + "variable": "$allowed_namespaces" + } + ], + "long_description_html": "This hook defines which block namespaces should have block name and attribute data-
attributes appended on render.
Allow 3rd parties to validate if an item can be added to the cart. This is a legacy hook from Woo core. This filter will be deprecated because it encourages usage of wc_add_notice. For the API we need to capture notices and convert to exceptions instead.
" + }, + "args": 5 + }, + { + "name": "woocommerce_adjust_non_base_location_prices", + "file": "StoreApi/Utilities/ProductQuery.php", + "type": "filter", + "doc": { + "description": "Filters if taxes should be removed from locations outside the store base location.", + "long_description": "The woocommerce_adjust_non_base_location_prices filter can stop base taxes being taken off when dealing with out of base locations. e.g. If a product costs 10 including tax, all users will pay 10 regardless of location and taxes.", + "tags": [ + { + "name": "internal", + "content": "Matches filter name in WooCommerce core." + }, + { + "name": "param", + "content": "True by default.", + "types": [ "boolean" ], + "variable": "$adjust_non_base_location_prices" + }, + { + "name": "return", + "content": "", + "types": [ "boolean" ] + } + ], + "long_description_html": "The woocommerce_adjust_non_base_location_prices filter can stop base taxes being taken off when dealing with out of base locations. e.g. If a product costs 10 including tax, all users will pay 10 regardless of location and taxes.
" + }, + "args": 1 + }, + { + "name": "woocommerce_admin_disabled", + "file": "InboxNotifications.php", + "type": "filter", + "doc": { + "description": "", + "long_description": "", + "tags": [], + "long_description_html": "" + }, + "args": 1 + }, + { + "name": "woocommerce_apply_individual_use_coupon", + "file": "StoreApi/Utilities/CartController.php", + "type": "filter", + "doc": { + "description": "Filter coupons to remove when applying an individual use coupon.", + "long_description": "", + "tags": [ + { + "name": "internal", + "content": "Matches filter name in WooCommerce core." + }, + { + "name": "param", + "content": "Array of coupons to remove from the cart.", + "types": [ "array" ], + "variable": "$coupons" + }, + { + "name": "param", + "content": "Coupon object applied to the cart.", + "types": [ "\\WC_Coupon" ], + "variable": "$coupon" + }, + { + "name": "param", + "content": "Array of applied coupons already applied to the cart.", + "types": [ "array" ], + "variable": "$applied_coupons" + }, + { + "name": "return", + "content": "", + "types": [ "array" ] + } + ], + "long_description_html": "" + }, + "args": 3 + }, + { + "name": "woocommerce_apply_with_individual_use_coupon", + "file": "StoreApi/Utilities/CartController.php", + "type": "filter", + "doc": { + "description": "Filters if a coupon can be applied alongside other individual use coupons.", + "long_description": "", + "tags": [ + { + "name": "internal", + "content": "Matches filter name in WooCommerce core." + }, + { + "name": "param", + "content": "Defaults to false.", + "types": [ "boolean" ], + "variable": "$apply_with_individual_use_coupon" + }, + { + "name": "param", + "content": "Coupon object applied to the cart.", + "types": [ "\\WC_Coupon" ], + "variable": "$coupon" + }, + { + "name": "param", + "content": "Individual use coupon already applied to the cart.", + "types": [ "\\WC_Coupon" ], + "variable": "$individual_use_coupon" + }, + { + "name": "param", + "content": "Array of applied coupons already applied to the cart.", + "types": [ "array" ], + "variable": "$applied_coupons" + }, + { + "name": "return", + "content": "", + "types": [ "boolean" ] + } + ], + "long_description_html": "" + }, + "args": 4 + }, + { + "name": "woocommerce_blocks_product_grid_is_cacheable", + "file": "BlockTypes/AbstractProductGrid.php", + "type": "filter", + "doc": { + "description": "Filters whether or not the product grid is cacheable.", + "long_description": "", + "tags": [ + { + "name": "param", + "content": "The list of script dependencies.", + "types": [ "boolean" ], + "variable": "$is_cacheable" + }, + { + "name": "param", + "content": "Query args for the products query passed to BlocksWpQuery.", + "types": [ "array" ], + "variable": "$query_args" + }, + { + "name": "return", + "content": "True to enable cache, false to disable cache.", + "types": [ "array" ] + } + ], + "long_description_html": "" + }, + "args": 2 + }, + { + "name": "woocommerce_blocks_product_grid_item_html", + "file": "BlockTypes/AbstractProductGrid.php", + "type": "filter", + "doc": { + "description": "Filters the HTML for products in the grid.", + "long_description": "", + "tags": [ + { + "name": "param", + "content": "Product grid item HTML.", + "types": [ "string" ], + "variable": "$html" + }, + { + "name": "param", + "content": "Product data passed to the template.", + "types": [ "array" ], + "variable": "$data" + }, + { + "name": "param", + "content": "Product object.", + "types": [ "\\WC_Product" ], + "variable": "$product" + }, + { + "name": "return", + "content": "Updated product grid item HTML.", + "types": [ "string" ] + } + ], + "long_description_html": "" + }, + "args": 3 + }, + { + "name": "woocommerce_blocks_register_script_dependencies", + "file": "Assets/Api.php", + "type": "filter", + "doc": { + "description": "Filters the list of script dependencies.", + "long_description": "", + "tags": [ + { + "name": "param", + "content": "The list of script dependencies.", + "types": [ "array" ], + "variable": "$dependencies" + }, + { + "name": "param", + "content": "The script's handle.", + "types": [ "string" ], + "variable": "$handle" + }, + { + "name": "return", + "content": "", + "types": [ "array" ] + } + ], + "long_description_html": "" + }, + "args": 2 + }, + { + "name": "woocommerce_cart_contents_changed", + "file": "StoreApi/Utilities/CartController.php", + "type": "filter", + "doc": { + "description": "Filters the entire cart contents when the cart changes.", + "long_description": "", + "tags": [ + { + "name": "internal", + "content": "Matches filter name in WooCommerce core." + }, + { + "name": "param", + "content": "Array of all cart items.", + "types": [ "array" ], + "variable": "$cart_contents" + }, + { + "name": "return", + "content": "Updated array of all cart items.", + "types": [ "array" ] + } + ], + "long_description_html": "" + }, + "args": 1 + }, + { + "name": "woocommerce_ga_disable_tracking", + "file": "Domain/Services/GoogleAnalytics.php", + "type": "filter", + "doc": { + "description": "Filter to disable Google Analytics tracking.", + "long_description": "", + "tags": [ + { + "name": "internal", + "content": "Matches filter name in GA extension." + }, + { + "name": "param", + "content": "If true, tracking will be disabled.", + "types": [ "boolean" ], + "variable": "$disable_tracking" + } + ], + "long_description_html": "" + }, + "args": 1 + }, + { + "name": "woocommerce_get_item_data", + "file": "StoreApi/Schemas/V1/CartItemSchema.php", + "type": "filter", + "doc": { + "description": "Filters cart item data.", + "long_description": "Filters the variation option name for custom option slugs.", + "tags": [ + { + "name": "internal", + "content": "Matches filter name in WooCommerce core." + }, + { + "name": "param", + "content": "Cart item data. Empty by default.", + "types": [ "array" ], + "variable": "$item_data" + }, + { + "name": "param", + "content": "Cart item array.", + "types": [ "array" ], + "variable": "$cart_item" + }, + { + "name": "return", + "content": "", + "types": [ "array" ] + } + ], + "long_description_html": "Filters the variation option name for custom option slugs.
" + }, + "args": 2 + }, + { + "name": "woocommerce_new_customer_data", + "file": "StoreApi/Routes/V1/Checkout.php", + "type": "filter", + "doc": { + "description": "Filters customer data before a customer account is registered.", + "long_description": "This hook filters customer data. It allows user data to be changed, for example, username, password, email, first name, last name, and role.", + "tags": [ + { + "name": "param", + "content": "An array of customer (user) data.", + "types": [ "array" ], + "variable": "$customer_data" + }, + { + "name": "return", + "content": "", + "types": [ "array" ] + } + ], + "long_description_html": "This hook filters customer data. It allows user data to be changed, for example, username, password, email, first name, last name, and role.
" + }, + "args": 1 + }, + { + "name": "woocommerce_registration_errors", + "file": "StoreApi/Routes/V1/Checkout.php", + "type": "filter", + "doc": { + "description": "Filters registration errors before a customer account is registered.", + "long_description": "This hook filters registration errors. This can be used to manipulate the array of errors before they are displayed.", + "tags": [ + { + "name": "internal", + "content": "Matches filter name in WooCommerce core." + }, + { + "name": "param", + "content": "Error object.", + "types": [ "\\WP_Error" ], + "variable": "$errors" + }, + { + "name": "param", + "content": "Customer username.", + "types": [ "string" ], + "variable": "$username" + }, + { + "name": "param", + "content": "Customer email address.", + "types": [ "string" ], + "variable": "$user_email" + }, + { + "name": "return", + "content": "", + "types": [ "\\WP_Error" ] + } + ], + "long_description_html": "This hook filters registration errors. This can be used to manipulate the array of errors before they are displayed.
" + }, + "args": 3 + }, + { + "name": "woocommerce_shared_settings", + "file": "Assets/AssetDataRegistry.php", + "type": "filter", + "doc": { + "description": "Filters the array of shared settings.", + "long_description": "Low level hook for registration of new data late in the cycle. This is deprecated. Instead, use the data api:\n ```php Automattic\\WooCommerce\\Blocks\\Package::container()->get( Automattic\\WooCommerce\\Blocks\\Assets\\AssetDataRegistry::class )->add( $key, $value ) ```", + "tags": [ + { + "name": "deprecated", + "content": "" + }, + { + "name": "param", + "content": "Settings data.", + "types": [ "array" ], + "variable": "$data" + }, + { + "name": "return", + "content": "", + "types": [ "array" ] + } + ], + "long_description_html": "Low level hook for registration of new data late in the cycle. This is deprecated. Instead, use the data api:
Automattic\\WooCommerce\\Blocks\\Package::container()->get( Automattic\\WooCommerce\\Blocks\\Assets\\AssetDataRegistry::class )->add( $key, $value )
"
+ },
+ "args": 1
+ },
+ {
+ "name": "woocommerce_shipping_package_name",
+ "file": "StoreApi/Utilities/CartController.php",
+ "type": "filter",
+ "doc": {
+ "description": "Filters the shipping package name.",
+ "long_description": "",
+ "tags": [
+ {
+ "name": "internal",
+ "content": "Matches filter name in WooCommerce core."
+ },
+ {
+ "name": "param",
+ "content": "Shipping package name.",
+ "types": [ "string" ],
+ "variable": "$shipping_package_name"
+ },
+ {
+ "name": "param",
+ "content": "Shipping package ID.",
+ "types": [ "string" ],
+ "variable": "$package_id"
+ },
+ {
+ "name": "param",
+ "content": "Shipping package from WooCommerce.",
+ "types": [ "array" ],
+ "variable": "$package"
+ },
+ {
+ "name": "return",
+ "content": "Shipping package name.",
+ "types": [ "string" ]
+ }
+ ],
+ "long_description_html": ""
+ },
+ "args": 3
+ },
+ {
+ "name": "woocommerce_show_page_title",
+ "file": "BlockTypes/ClassicTemplate.php",
+ "type": "filter",
+ "doc": {
+ "description": "We need to load the scripts here because when using block templates wp_head() gets run after the block template. As a result we are trying to enqueue required scripts before we have even registered them.",
+ "long_description": "",
+ "tags": [
+ {
+ "name": "see",
+ "content": "",
+ "refers": "https://github.com/woocommerce/woocommerce-gutenberg-products-block/issues/5328#issuecomment-989013447"
+ }
+ ],
+ "long_description_html": ""
+ },
+ "args": 1
+ },
+ {
+ "name": "woocommerce_store_api_disable_nonce_check",
+ "file": "StoreApi/Routes/V1/AbstractCartRoute.php",
+ "type": "filter",
+ "doc": {
+ "description": "Filters the Store API nonce check.",
+ "long_description": "This can be used to disable the nonce check when testing API endpoints via a REST API client.",
+ "tags": [
+ {
+ "name": "param",
+ "content": "If true, nonce checks will be disabled.",
+ "types": [ "boolean" ],
+ "variable": "$disable_nonce_check"
+ },
+ {
+ "name": "return",
+ "content": "",
+ "types": [ "boolean" ]
+ }
+ ],
+ "long_description_html": "This can be used to disable the nonce check when testing API endpoints via a REST API client.
" + }, + "args": 1 + }, + { + "name": "woocommerce_store_api_product_quantity_limit", + "file": "StoreApi/Utilities/QuantityLimits.php", + "type": "filter", + "doc": { + "description": "Filters the quantity limit for a product being added to the cart via the Store API.", + "long_description": "Filters the variation option name for custom option slugs.", + "tags": [ + { + "name": "param", + "content": "Quantity limit which defaults to 9999 unless sold individually.", + "types": [ "integer" ], + "variable": "$quantity_limit" + }, + { + "name": "param", + "content": "Product instance.", + "types": [ "\\WC_Product" ], + "variable": "$product" + }, + { + "name": "return", + "content": "", + "types": [ "integer" ] + } + ], + "long_description_html": "Filters the variation option name for custom option slugs.
" + }, + "args": 2 + }, + { + "name": "woocommerce_store_api_product_quantity_{$value_type}", + "file": "StoreApi/Utilities/QuantityLimits.php", + "type": "filter", + "doc": { + "description": "Filters the quantity minimum for a cart item in Store API. This allows extensions to control the minimum qty of items already within the cart.", + "long_description": "The suffix of the hook will vary depending on the value being filtered. For example, minimum, maximum, multiple_of, editable.", + "tags": [ + { + "name": "param", + "content": "The value being filtered.", + "types": [ "mixed" ], + "variable": "$value" + }, + { + "name": "param", + "content": "The product object.", + "types": [ "\\WC_Product" ], + "variable": "$product" + }, + { + "name": "param", + "content": "The cart item if the product exists in the cart, or null.", + "types": [ "array", "null" ], + "variable": "$cart_item" + }, + { + "name": "return", + "content": "", + "types": [ "mixed" ] + } + ], + "long_description_html": "The suffix of the hook will vary depending on the value being filtered. For example, minimum, maximum, multiple_of, editable.
" + }, + "args": 3 + }, + { + "name": "woocommerce_variation_option_name", + "file": "StoreApi/Schemas/V1/CartItemSchema.php", + "type": "filter", + "doc": { + "description": "Filters the variation option name.", + "long_description": "Filters the variation option name for custom option slugs.", + "tags": [ + { + "name": "internal", + "content": "Matches filter name in WooCommerce core." + }, + { + "name": "param", + "content": "The name to display.", + "types": [ "string" ], + "variable": "$value" + }, + { + "name": "param", + "content": "Unused because this is not a variation taxonomy.", + "types": [ "null" ], + "variable": "$unused" + }, + { + "name": "param", + "content": "Taxonomy or product attribute name.", + "types": [ "string" ], + "variable": "$taxonomy" + }, + { + "name": "param", + "content": "Product data.", + "types": [ "\\WC_Product" ], + "variable": "$product" + }, + { + "name": "return", + "content": "", + "types": [ "string" ] + } + ], + "long_description_html": "Filters the variation option name for custom option slugs.
" + }, + "args": 4 + } + ] +} diff --git a/images/previews/hoodie-with-zipper.jpeg b/images/previews/hoodie-with-zipper.jpeg new file mode 100644 index 00000000000..f9b27c9fd35 Binary files /dev/null and b/images/previews/hoodie-with-zipper.jpeg differ diff --git a/images/previews/long-sleeve-tee.jpeg b/images/previews/long-sleeve-tee.jpeg new file mode 100644 index 00000000000..64c7d9d9e69 Binary files /dev/null and b/images/previews/long-sleeve-tee.jpeg differ diff --git a/images/previews/polo.jpeg b/images/previews/polo.jpeg new file mode 100644 index 00000000000..6766cc216c7 Binary files /dev/null and b/images/previews/polo.jpeg differ diff --git a/packages/checkout/blocks-registry/types.ts b/packages/checkout/blocks-registry/types.ts index 7bbcbbdb7ee..f752f2910bc 100644 --- a/packages/checkout/blocks-registry/types.ts +++ b/packages/checkout/blocks-registry/types.ts @@ -18,6 +18,7 @@ export enum innerBlockAreas { EMPTY_CART = 'woocommerce/empty-cart-block', FILLED_CART = 'woocommerce/filled-cart-block', CART_ITEMS = 'woocommerce/cart-items-block', + CART_CROSS_SELLS = 'woocommerce/cart-cross-sells-block', CART_TOTALS = 'woocommerce/cart-totals-block', MINI_CART = 'woocommerce/mini-cart-contents', EMPTY_MINI_CART = 'woocommerce/empty-mini-cart-contents-block', diff --git a/src/StoreApi/README.md b/src/StoreApi/README.md index 2e301ec8e6f..b4760294b11 100644 --- a/src/StoreApi/README.md +++ b/src/StoreApi/README.md @@ -141,7 +141,7 @@ Please review the [Store API Guiding principles](./docs/guiding-principles.md). ## Extensibility -The approach to extensibility within the Store API is to expose certain routes and schema to the ExtendSchema class. [Documentation for contributors on this can be found here](https://github.com/woocommerce/woocommerce-gutenberg-products-block/blob/trunk/docs/extensibility/extend-rest-api-new-endpoint.md). +The approach to extensibility within the Store API is to expose certain routes and schema to the ExtendSchema class. [Documentation for contributors on this can be found here](../../docs/third-party-developers/extensibility/rest-api/extend-rest-api-new-endpoint.md). If a route includes the extensibility interface, 3rd party developers can use the shared `ExtendSchema::class` instance to register additional endpoint data and additional schema. diff --git a/tests/e2e/config/custom-matchers/__fixtures__/best-selling-products.fixture.json b/tests/e2e/config/custom-matchers/__fixtures__/best-selling-products.fixture.json index 83be6820f4d..592c5ded3ea 100644 --- a/tests/e2e/config/custom-matchers/__fixtures__/best-selling-products.fixture.json +++ b/tests/e2e/config/custom-matchers/__fixtures__/best-selling-products.fixture.json @@ -1 +1,4 @@ -{"title":"Best Selling Products Block","pageContent":""} \ No newline at end of file +{ + "title": "Best Selling Products Block", + "pageContent": "" +} diff --git a/tests/e2e/config/custom-matchers/__fixtures__/featured-category.fixture.json b/tests/e2e/config/custom-matchers/__fixtures__/featured-category.fixture.json index 60f0ae7b0d9..b6c77eb3381 100644 --- a/tests/e2e/config/custom-matchers/__fixtures__/featured-category.fixture.json +++ b/tests/e2e/config/custom-matchers/__fixtures__/featured-category.fixture.json @@ -1 +1,4 @@ -{"title":"Featured Category Block","pageContent":""} \ No newline at end of file +{ + "title": "Featured Category Block", + "pageContent": "" +} diff --git a/tests/e2e/config/custom-matchers/__fixtures__/hand-picked-products.fixture.json b/tests/e2e/config/custom-matchers/__fixtures__/hand-picked-products.fixture.json index 907b84ea5ec..4b2f1de3f43 100644 --- a/tests/e2e/config/custom-matchers/__fixtures__/hand-picked-products.fixture.json +++ b/tests/e2e/config/custom-matchers/__fixtures__/hand-picked-products.fixture.json @@ -1 +1,4 @@ -{"title":"Hand-picked Products Block","pageContent":""} \ No newline at end of file +{ + "title": "Hand-picked Products Block", + "pageContent": "" +} diff --git a/tests/e2e/config/custom-matchers/__fixtures__/newest-products.fixture.json b/tests/e2e/config/custom-matchers/__fixtures__/newest-products.fixture.json index 5ffe302fc75..d3aa952f8b7 100644 --- a/tests/e2e/config/custom-matchers/__fixtures__/newest-products.fixture.json +++ b/tests/e2e/config/custom-matchers/__fixtures__/newest-products.fixture.json @@ -1 +1,4 @@ -{"title":"Newest Products Block","pageContent":""} \ No newline at end of file +{ + "title": "Newest Products Block", + "pageContent": "" +} diff --git a/tests/e2e/config/custom-matchers/__fixtures__/product-categories-list.fixture.json b/tests/e2e/config/custom-matchers/__fixtures__/product-categories-list.fixture.json index 7e6a4d9e3bb..6f6baf27aef 100644 --- a/tests/e2e/config/custom-matchers/__fixtures__/product-categories-list.fixture.json +++ b/tests/e2e/config/custom-matchers/__fixtures__/product-categories-list.fixture.json @@ -1 +1,4 @@ -{"title":"Product Categories List Block","pageContent":""} \ No newline at end of file +{ + "title": "Product Categories List Block", + "pageContent": "" +} diff --git a/tests/e2e/config/custom-matchers/__fixtures__/top-rated-products.fixture.json b/tests/e2e/config/custom-matchers/__fixtures__/top-rated-products.fixture.json index 4adb6788563..a3190e493b4 100644 --- a/tests/e2e/config/custom-matchers/__fixtures__/top-rated-products.fixture.json +++ b/tests/e2e/config/custom-matchers/__fixtures__/top-rated-products.fixture.json @@ -1 +1,4 @@ -{"title":"Top Rated Products Block","pageContent":""} \ No newline at end of file +{ + "title": "Top Rated Products Block", + "pageContent": "" +}