diff --git a/plugins/woocommerce-blocks/.github/workflows/check-doc-links.yml b/plugins/woocommerce-blocks/.github/workflows/check-doc-links.yml index 805a85be97b..058b2fb3747 100644 --- a/plugins/woocommerce-blocks/.github/workflows/check-doc-links.yml +++ b/plugins/woocommerce-blocks/.github/workflows/check-doc-links.yml @@ -11,18 +11,23 @@ concurrency: permissions: {} jobs: - markdown-link-check: - runs-on: ubuntu-latest - permissions: - contents: read - steps: - - uses: actions/checkout@v3 - - uses: gaurav-nelson/github-action-markdown-link-check@v1 - with: - use-quiet-mode: 'yes' - use-verbose-mode: 'no' - config-file: '.github/workflows/check-doc-links-config.json' - folder-path: './docs' - file-path: './README.md' - max-depth: 3 - base-branch: 'trunk' + markdown_link_check: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Install Node.js + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + cache: 'npm' + + - name: Install markdown-link-check + run: npm install -g markdown-link-check + + - name: Run markdown-link-check + run: | + find ./docs -path ./docs/internal-developers/testing/releases -prune -o -name "*.md" -print0 | xargs -0 -n1 markdown-link-check -c .github/workflows/check-doc-links-config.json + diff --git a/plugins/woocommerce-blocks/bin/hook-docs/data/actions.json b/plugins/woocommerce-blocks/bin/hook-docs/data/actions.json index b317628eb7f..9c6c1650a80 100644 --- a/plugins/woocommerce-blocks/bin/hook-docs/data/actions.json +++ b/plugins/woocommerce-blocks/bin/hook-docs/data/actions.json @@ -603,46 +603,6 @@ }, "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", @@ -813,6 +773,40 @@ }, "args": 2 }, + { + "name": "woocommerce_store_api_checkout_order_processed", + "file": "StoreApi/Routes/V1/CheckoutOrder.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": "since", + "content": "7.2.0" + }, + { + "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.
" + "long_description_html": "" }, "args": 2 }, diff --git a/plugins/woocommerce-blocks/bin/hook-docs/data/filters.json b/plugins/woocommerce-blocks/bin/hook-docs/data/filters.json index b9edf39f0a8..e8a110dd56c 100644 --- a/plugins/woocommerce-blocks/bin/hook-docs/data/filters.json +++ b/plugins/woocommerce-blocks/bin/hook-docs/data/filters.json @@ -120,6 +120,30 @@ }, "args": 1 }, + { + "name": "loop_shop_per_page", + "file": "BlockTypes/ProductQuery.php", + "type": "filter", + "doc": { + "description": "", + "long_description": "", + "tags": [], + "long_description_html": "" + }, + "args": 1 + }, + { + "name": "loop_shop_per_page", + "file": "BlockTypes/ProductCollection.php", + "type": "filter", + "doc": { + "description": "", + "long_description": "", + "tags": [], + "long_description_html": "" + }, + "args": 1 + }, { "name": "wc_session_expiration", "file": "StoreApi/Routes/V1/AbstractCartRoute.php", @@ -249,6 +273,39 @@ }, "args": 4 }, + { + "name": "woocommerce_add_to_cart_quantity", + "file": "BlockTypes/ProductButton.php", + "type": "filter", + "doc": { + "description": "Filters the change the quantity to add to cart.", + "long_description": "", + "tags": [ + { + "name": "since", + "content": "10.9.0" + }, + { + "name": "param", + "content": "The default quantity.", + "types": [ + "\\Automattic\\WooCommerce\\Blocks\\BlockTypes\\number" + ], + "variable": "$default_quantity" + }, + { + "name": "param", + "content": "The product id.", + "types": [ + "\\Automattic\\WooCommerce\\Blocks\\BlockTypes\\number" + ], + "variable": "$product_id" + } + ], + "long_description_html": "" + }, + "args": 2 + }, { "name": "woocommerce_add_to_cart_sold_individually_quantity", "file": "StoreApi/Utilities/CartController.php", @@ -734,6 +791,47 @@ }, "args": 1 }, + { + "name": "woocommerce_cart_item_permalink", + "file": "StoreApi/Schemas/V1/CartItemSchema.php", + "type": "filter", + "doc": { + "description": "Filter the product permalink.", + "long_description": "This is a hook taken from the legacy cart/mini-cart templates that allows the permalink to be changed for a product. This is specific to the cart endpoint.", + "tags": [ + { + "name": "since", + "content": "9.9.0" + }, + { + "name": "param", + "content": "Product permalink.", + "types": [ + "string" + ], + "variable": "$product_permalink" + }, + { + "name": "param", + "content": "Cart item array.", + "types": [ + "array" + ], + "variable": "$cart_item" + }, + { + "name": "param", + "content": "Cart item key.", + "types": [ + "string" + ], + "variable": "$cart_item_key" + } + ], + "long_description_html": "This is a hook taken from the legacy cart/mini-cart templates that allows the permalink to be changed for a product. This is specific to the cart endpoint.
" + }, + "args": 3 + }, { "name": "woocommerce_disable_compatibility_layer", "file": "Templates/AbstractTemplateCompatibility.php", @@ -933,6 +1031,88 @@ }, "args": 1 }, + { + "name": "woocommerce_pay_order_product_has_enough_stock", + "file": "StoreApi/Utilities/OrderController.php", + "type": "filter", + "doc": { + "description": "Filters whether or not the product has enough stock.", + "long_description": "", + "tags": [ + { + "name": "param", + "content": "True if has enough stock.", + "types": [ + "boolean" + ], + "variable": "" + }, + { + "name": "param", + "content": "Product.", + "types": [ + "\\WC_Product" + ], + "variable": "$product" + }, + { + "name": "param", + "content": "Order.", + "types": [ + "\\WC_Order" + ], + "variable": "$order" + }, + { + "name": "since", + "content": "9.8.0-dev" + } + ], + "long_description_html": "" + }, + "args": 3 + }, + { + "name": "woocommerce_pay_order_product_in_stock", + "file": "StoreApi/Utilities/OrderController.php", + "type": "filter", + "doc": { + "description": "Filters whether or not the product is in stock for this pay for order.", + "long_description": "", + "tags": [ + { + "name": "param", + "content": "True if in stock.", + "types": [ + "boolean" + ], + "variable": "" + }, + { + "name": "param", + "content": "Product.", + "types": [ + "\\WC_Product" + ], + "variable": "$product" + }, + { + "name": "param", + "content": "Order.", + "types": [ + "\\WC_Order" + ], + "variable": "$order" + }, + { + "name": "since", + "content": "9.8.0-dev" + } + ], + "long_description_html": "" + }, + "args": 3 + }, { "name": "woocommerce_registration_errors", "file": "StoreApi/Routes/V1/Checkout.php", @@ -1102,6 +1282,39 @@ }, "args": 1 }, + { + "name": "woocommerce_single_product_image_thumbnail_html", + "file": "BlockTypes/ProductGalleryThumbnails.php", + "type": "filter", + "doc": { + "description": "Filter the HTML markup for a single product image thumbnail in the gallery.", + "long_description": "", + "tags": [ + { + "name": "param", + "content": "The HTML markup for the thumbnail.", + "types": [ + "string" + ], + "variable": "$thumbnail_html" + }, + { + "name": "param", + "content": "The attachment ID of the thumbnail.", + "types": [ + "int" + ], + "variable": "$attachment_id" + }, + { + "name": "since", + "content": "7.9.0" + } + ], + "long_description_html": "" + }, + "args": 2 + }, { "name": "woocommerce_store_api_add_to_cart_data", "file": "StoreApi/Routes/V1/CartAddItem.php", @@ -1286,66 +1499,6 @@ "long_description_html": "" }, "args": 1 - }, - { - "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": "since", - "content": "2.5.0" - }, - { - "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 diff --git a/plugins/woocommerce-blocks/bin/hook-docs/utilities/generate-toc.js b/plugins/woocommerce-blocks/bin/hook-docs/utilities/generate-toc.js index 6ec1e80aec5..ae96ff12a85 100644 --- a/plugins/woocommerce-blocks/bin/hook-docs/utilities/generate-toc.js +++ b/plugins/woocommerce-blocks/bin/hook-docs/utilities/generate-toc.js @@ -12,11 +12,14 @@ const generateToc = ( hooks ) => { const heading = isDeprecated ? `~~${ hookName }~~` : `${ hookName }`; - let anchor = heading .trim() .toLowerCase() + .replace( /\(\)/g, '' ) + .replace( /\{\$(.*?)->(.*?)}/g, '$1-$2' ) + .replace( /\{\$(.*?)}/g, '$1' ) .replace( /[^\w\- ]+/g, ' ' ) + .trim() .replace( /\s+/g, '-' ) .replace( /\-+$/, '' ); if ( usedHeaders.indexOf( anchor ) !== -1 ) { @@ -28,7 +31,6 @@ const generateToc = ( hooks ) => { anchor = anchor + '-' + i; } usedHeaders.push( anchor ); - return `[${ hook.name }](#${ anchor })`; } ), }, diff --git a/plugins/woocommerce-blocks/docs/README.md b/plugins/woocommerce-blocks/docs/README.md index 3b18fdb9600..ea940e2e8ef 100644 --- a/plugins/woocommerce-blocks/docs/README.md +++ b/plugins/woocommerce-blocks/docs/README.md @@ -152,3 +152,4 @@ The following tutorials from [developer.woocommerce.com](https://developer.wooco 🐞 Found a mistake, or have a suggestion? [Leave feedback about this document here.](https://github.com/woocommerce/woocommerce-blocks/issues/new?assignees=&labels=type%3A+documentation&template=--doc-feedback.md&title=Feedback%20on%20./docs/README.md) + diff --git a/plugins/woocommerce-blocks/docs/contributors/README.md b/plugins/woocommerce-blocks/docs/contributors/README.md index 54615cf240b..a43293e5131 100644 --- a/plugins/woocommerce-blocks/docs/contributors/README.md +++ b/plugins/woocommerce-blocks/docs/contributors/README.md @@ -36,6 +36,8 @@ Our [JavaScript Build System](javascript-build-system.md) guide offers a detaile Last but not least, to get an insight into how CSS is built, refer to the [CSS Build System](css-build-system.md) guide. A firm grasp of this will ensure your CSS files meet the standards and quality expected. + + --- [We're hiring!](https://woocommerce.com/careers/) Come work with us! @@ -43,3 +45,4 @@ Last but not least, to get an insight into how CSS is built, refer to the [CSS B 🐞 Found a mistake, or have a suggestion? [Leave feedback about this document here.](https://github.com/woocommerce/woocommerce-blocks/issues/new?assignees=&labels=type%3A+documentation&template=--doc-feedback.md&title=Feedback%20on%20./docs/contributors/README.md) + diff --git a/plugins/woocommerce-blocks/docs/contributors/block-assets.md b/plugins/woocommerce-blocks/docs/contributors/block-assets.md index 63f2a916cc3..d60663d4db0 100644 --- a/plugins/woocommerce-blocks/docs/contributors/block-assets.md +++ b/plugins/woocommerce-blocks/docs/contributors/block-assets.md @@ -95,6 +95,7 @@ wc.wcSettings.getSetting( 'key' ); [We're hiring!](https://woocommerce.com/careers/) Come work with us! -🐞 Found a mistake, or have a suggestion? [Leave feedback about this document here.](https://github.com/woocommerce/woocommerce-blocks/issues/new?assignees=&labels=type%3A+documentation&template=--doc-feedback.md&title=Feedback%20on%20./docs/contributors/documentation-guidelines.md) +🐞 Found a mistake, or have a suggestion? [Leave feedback about this document here.](https://github.com/woocommerce/woocommerce-blocks/issues/new?assignees=&labels=type%3A+documentation&template=--doc-feedback.md&title=Feedback%20on%20./docs/contributors/block-assets.md) + diff --git a/plugins/woocommerce-blocks/docs/contributors/coding-guidelines.md b/plugins/woocommerce-blocks/docs/contributors/coding-guidelines.md index 70a095e6a24..099fbacfdad 100644 --- a/plugins/woocommerce-blocks/docs/contributors/coding-guidelines.md +++ b/plugins/woocommerce-blocks/docs/contributors/coding-guidelines.md @@ -179,6 +179,7 @@ Notice in the worst case scenario we would have increased selector specificity b [We're hiring!](https://woocommerce.com/careers/) Come work with us! -🐞 Found a mistake, or have a suggestion? [Leave feedback about this document here.](https://github.com/woocommerce/woocommerce-blocks/issues/new?assignees=&labels=type%3A+documentation&template=--doc-feedback.md&title=Feedback%20on%20./docs/contributors/documentation-guidelines.md) +🐞 Found a mistake, or have a suggestion? [Leave feedback about this document here.](https://github.com/woocommerce/woocommerce-blocks/issues/new?assignees=&labels=type%3A+documentation&template=--doc-feedback.md&title=Feedback%20on%20./docs/contributors/coding-guidelines.md) + diff --git a/plugins/woocommerce-blocks/docs/contributors/components.md b/plugins/woocommerce-blocks/docs/contributors/components.md index cb17a0281c8..71081ad3673 100644 --- a/plugins/woocommerce-blocks/docs/contributors/components.md +++ b/plugins/woocommerce-blocks/docs/contributors/components.md @@ -46,6 +46,7 @@ If you're stuck, copy source of an existing story to get started. [We're hiring!](https://woocommerce.com/careers/) Come work with us! -🐞 Found a mistake, or have a suggestion? [Leave feedback about this document here.](https://github.com/woocommerce/woocommerce-blocks/issues/new?assignees=&labels=type%3A+documentation&template=--doc-feedback.md&title=Feedback%20on%20./docs/contributors/documentation-guidelines.md) +🐞 Found a mistake, or have a suggestion? [Leave feedback about this document here.](https://github.com/woocommerce/woocommerce-blocks/issues/new?assignees=&labels=type%3A+documentation&template=--doc-feedback.md&title=Feedback%20on%20./docs/contributors/components.md) + diff --git a/plugins/woocommerce-blocks/docs/contributors/css-build-system.md b/plugins/woocommerce-blocks/docs/contributors/css-build-system.md index 0402b368542..6ef51402101 100644 --- a/plugins/woocommerce-blocks/docs/contributors/css-build-system.md +++ b/plugins/woocommerce-blocks/docs/contributors/css-build-system.md @@ -31,6 +31,7 @@ Webpack config is split between several files, some relevant ones for the CSS bu [We're hiring!](https://woocommerce.com/careers/) Come work with us! -🐞 Found a mistake, or have a suggestion? [Leave feedback about this document here.](https://github.com/woocommerce/woocommerce-blocks/issues/new?assignees=&labels=type%3A+documentation&template=--doc-feedback.md&title=Feedback%20on%20./docs/contributors/documentation-guidelines.md) +🐞 Found a mistake, or have a suggestion? [Leave feedback about this document here.](https://github.com/woocommerce/woocommerce-blocks/issues/new?assignees=&labels=type%3A+documentation&template=--doc-feedback.md&title=Feedback%20on%20./docs/contributors/css-build-system.md) + diff --git a/plugins/woocommerce-blocks/docs/contributors/documentation-guidelines.md b/plugins/woocommerce-blocks/docs/contributors/documentation-guidelines.md index 445d3ef1408..eb515d535e2 100644 --- a/plugins/woocommerce-blocks/docs/contributors/documentation-guidelines.md +++ b/plugins/woocommerce-blocks/docs/contributors/documentation-guidelines.md @@ -168,3 +168,4 @@ When referencing other documentations, the corresponding document should be link 🐞 Found a mistake, or have a suggestion? [Leave feedback about this document here.](https://github.com/woocommerce/woocommerce-blocks/issues/new?assignees=&labels=type%3A+documentation&template=--doc-feedback.md&title=Feedback%20on%20./docs/contributors/documentation-guidelines.md) + diff --git a/plugins/woocommerce-blocks/docs/contributors/e2e-guidelines.md b/plugins/woocommerce-blocks/docs/contributors/e2e-guidelines.md index 1bcc1e46c48..e7c26644120 100644 --- a/plugins/woocommerce-blocks/docs/contributors/e2e-guidelines.md +++ b/plugins/woocommerce-blocks/docs/contributors/e2e-guidelines.md @@ -62,6 +62,7 @@ By using these packages, you can make your code more modular and easier to maint [We're hiring!](https://woocommerce.com/careers/) Come work with us! -🐞 Found a mistake, or have a suggestion? [Leave feedback about this document here.](https://github.com/woocommerce/woocommerce-blocks/issues/new?assignees=&labels=type%3A+documentation&template=--doc-feedback.md&title=Feedback%20on%20./docs/contributors/documentation-guidelines.md) +🐞 Found a mistake, or have a suggestion? [Leave feedback about this document here.](https://github.com/woocommerce/woocommerce-blocks/issues/new?assignees=&labels=type%3A+documentation&template=--doc-feedback.md&title=Feedback%20on%20./docs/contributors/e2e-guidelines.md) + diff --git a/plugins/woocommerce-blocks/docs/contributors/folder-structure.md b/plugins/woocommerce-blocks/docs/contributors/folder-structure.md index 9ead474b67e..9e4edc88885 100644 --- a/plugins/woocommerce-blocks/docs/contributors/folder-structure.md +++ b/plugins/woocommerce-blocks/docs/contributors/folder-structure.md @@ -197,3 +197,4 @@ This file is inspired by the great work of @JustinyAhin and @gziolo inThis 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.
- -### Parameters - -| Argument | Type | Description | -| -------- | ---------------- | ------------------------------- | -| $order | \WC_Order | Order object. | +| Argument | Type | Description | +| -------- | ---- | ----------- | +| $customer | \WC_Customer | Customer object. | | $request | \WP_REST_Request | Full details about the request. | ### Source -- [StoreApi/Routes/V1/Checkout.php](../../../../src/StoreApi/Routes/V1/Checkout.php) + + - [StoreApi/Routes/V1/CheckoutOrder.php](../../../../src/StoreApi/Routes/V1/CheckoutOrder.php) + - [StoreApi/Routes/V1/Checkout.php](../../../../src/StoreApi/Routes/V1/Checkout.php) --- ## woocommerce_store_api_checkout_update_order_meta + Fires when the Checkout Block/Store API updates an order's meta data. ```php @@ -691,22 +712,25 @@ do_action( 'woocommerce_store_api_checkout_update_order_meta', \WC_Order $order ### Parameters -| Argument | Type | Description | -| -------- | --------- | ------------- | -| $order | \WC_Order | Order object. | +| Argument | Type | Description | +| -------- | ---- | ----------- | +| $order | \WC_Order | Order object. | ### See -- https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/3686 + + - https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/3686 ### Source -- [StoreApi/Routes/V1/Checkout.php](../../../../src/StoreApi/Routes/V1/Checkout.php) + + - [StoreApi/Routes/V1/Checkout.php](../../../../src/StoreApi/Routes/V1/Checkout.php) --- ## woocommerce_store_api_rate_limit_exceeded + Fires when the rate limit is exceeded. ```php @@ -715,18 +739,20 @@ do_action( 'woocommerce_store_api_rate_limit_exceeded', string $ip_address ) ### Parameters -| Argument | Type | Description | -| ----------- | ------ | ------------------------------ | +| Argument | Type | Description | +| -------- | ---- | ----------- | | $ip_address | string | The IP address of the request. | ### Source -- [StoreApi/Authentication.php](../../../../src/StoreApi/Authentication.php) + + - [StoreApi/Authentication.php](../../../../src/StoreApi/Authentication.php) --- ## woocommerce_store_api_validate_add_to_cart + Fires during validation when adding an item to the cart via the Store API. ```php @@ -739,19 +765,21 @@ do_action( 'woocommerce_store_api_validate_add_to_cart', \WC_Product $product, a ### Parameters -| Argument | Type | Description | -| -------- | ----------- | ---------------------------------------------------------------------------- | -| $product | \WC_Product | Product object being added to the cart. | -| $request | array | Add to cart request params including id, quantity, and variation attributes. | +| Argument | Type | Description | +| -------- | ---- | ----------- | +| $product | \WC_Product | Product object being added to the cart. | +| $request | array | Add to cart request params including id, quantity, and variation attributes. | ### Source -- [StoreApi/Utilities/CartController.php](../../../../src/StoreApi/Utilities/CartController.php) + + - [StoreApi/Utilities/CartController.php](../../../../src/StoreApi/Utilities/CartController.php) --- ## woocommerce_store_api_validate_cart_item + Fire action to validate add to cart. Functions hooking into this should throw an \Exception to prevent add to cart from occurring. ```php @@ -760,18 +788,20 @@ do_action( 'woocommerce_store_api_validate_cart_item', \WC_Product $product, arr ### Parameters -| Argument | Type | Description | -| ---------- | ----------- | --------------------------------------- | -| $product | \WC_Product | Product object being added to the cart. | -| $cart_item | array | Cart item array. | +| Argument | Type | Description | +| -------- | ---- | ----------- | +| $product | \WC_Product | Product object being added to the cart. | +| $cart_item | array | Cart item array. | ### Source -- [StoreApi/Utilities/CartController.php](../../../../src/StoreApi/Utilities/CartController.php) + + - [StoreApi/Utilities/CartController.php](../../../../src/StoreApi/Utilities/CartController.php) --- -## woocommerce\_{$product->get_type()}\_add_to_cart +## woocommerce_{$product->get_type()}_add_to_cart + Trigger the single product add to cart action for each product type. @@ -781,12 +811,14 @@ do_action( 'woocommerce_{$product->get_type()}_add_to_cart' ) ### Source -- [BlockTypes/AddToCartForm.php](../../../../src/BlockTypes/AddToCartForm.php) + + - [BlockTypes/AddToCartForm.php](../../../../src/BlockTypes/AddToCartForm.php) --- ## {$hook} + Action to render the content of a hook. ```php @@ -795,10 +827,10 @@ do_action( '{$hook}' ) ### Source -- [Templates/AbstractTemplateCompatibility.php](../../../../src/Templates/AbstractTemplateCompatibility.php) + + - [Templates/AbstractTemplateCompatibility.php](../../../../src/Templates/AbstractTemplateCompatibility.php) --- - --- @@ -808,3 +840,4 @@ do_action( '{$hook}' ) 🐞 Found a mistake, or have a suggestion? [Leave feedback about this document here.](https://github.com/woocommerce/woocommerce-blocks/issues/new?assignees=&labels=type%3A+documentation&template=--doc-feedback.md&title=Feedback%20on%20./docs/third-party-developers/extensibility/hooks/actions.md) + diff --git a/plugins/woocommerce-blocks/docs/third-party-developers/extensibility/hooks/filters.md b/plugins/woocommerce-blocks/docs/third-party-developers/extensibility/hooks/filters.md index b446dff5f9d..2ac864847ab 100644 --- a/plugins/woocommerce-blocks/docs/third-party-developers/extensibility/hooks/filters.md +++ b/plugins/woocommerce-blocks/docs/third-party-developers/extensibility/hooks/filters.md @@ -6,45 +6,52 @@ ## Table of Contents -- [\_\_experimental_woocommerce_blocks_add_data_attributes_to_block](#__experimental_woocommerce_blocks_add_data_attributes_to_block) -- [\_\_experimental_woocommerce_blocks_add_data_attributes_to_namespace](#__experimental_woocommerce_blocks_add_data_attributes_to_namespace) -- [\_\_experimental_woocommerce_blocks_payment_gateway_features_list](#__experimental_woocommerce_blocks_payment_gateway_features_list) -- [deprecated_function_trigger_error](#deprecated_function_trigger_error) -- [wc_session_expiration](#wc_session_expiration) -- [woocommerce_add_cart_item](#woocommerce_add_cart_item) -- [woocommerce_add_cart_item_data](#woocommerce_add_cart_item_data) -- [woocommerce_add_to_cart_sold_individually_quantity](#woocommerce_add_to_cart_sold_individually_quantity) -- [woocommerce_add_to_cart_validation](#-woocommerce_add_to_cart_validation) -- [woocommerce_adjust_non_base_location_prices](#woocommerce_adjust_non_base_location_prices) -- [woocommerce_apply_base_tax_for_local_pickup](#woocommerce_apply_base_tax_for_local_pickup) -- [woocommerce_apply_individual_use_coupon](#woocommerce_apply_individual_use_coupon) -- [woocommerce_apply_with_individual_use_coupon](#woocommerce_apply_with_individual_use_coupon) -- [woocommerce_blocks_hook_compatibility_additional_data](#woocommerce_blocks_hook_compatibility_additional_data) -- [woocommerce_blocks_product_grid_is_cacheable](#woocommerce_blocks_product_grid_is_cacheable) -- [woocommerce_blocks_product_grid_item_html](#woocommerce_blocks_product_grid_item_html) -- [woocommerce_blocks_register_script_dependencies](#woocommerce_blocks_register_script_dependencies) -- [woocommerce_cart_contents_changed](#woocommerce_cart_contents_changed) -- [woocommerce_disable_compatibility_layer](#woocommerce_disable_compatibility_layer) -- [woocommerce_ga_disable_tracking](#woocommerce_ga_disable_tracking) -- [woocommerce_get_item_data](#woocommerce_get_item_data) -- [woocommerce_loop_add_to_cart_args](#woocommerce_loop_add_to_cart_args) -- [woocommerce_loop_add_to_cart_link](#woocommerce_loop_add_to_cart_link) -- [woocommerce_new_customer_data](#woocommerce_new_customer_data) -- [woocommerce_registration_errors](#woocommerce_registration_errors) -- [woocommerce_shared_settings](#-woocommerce_shared_settings) -- [woocommerce_shipping_package_name](#woocommerce_shipping_package_name) -- [woocommerce*shipping*{$this->id}\_is_available](#woocommerce_shipping_-this--id-_is_available) -- [woocommerce_show_page_title](#woocommerce_show_page_title) -- [woocommerce_store_api_add_to_cart_data](#woocommerce_store_api_add_to_cart_data) -- [woocommerce_store_api_disable_nonce_check](#woocommerce_store_api_disable_nonce_check) -- [woocommerce_store_api_product_quantity_limit](#woocommerce_store_api_product_quantity_limit) -- [woocommerce*store_api_product_quantity*{$value_type}](#woocommerce_store_api_product_quantity_-value_type) -- [woocommerce_store_api_rate_limit_options](#woocommerce_store_api_rate_limit_options) -- [woocommerce_variation_option_name](#woocommerce_variation_option_name) + + - [__experimental_woocommerce_blocks_add_data_attributes_to_block](#__experimental_woocommerce_blocks_add_data_attributes_to_block) + - [__experimental_woocommerce_blocks_add_data_attributes_to_namespace](#__experimental_woocommerce_blocks_add_data_attributes_to_namespace) + - [__experimental_woocommerce_blocks_payment_gateway_features_list](#__experimental_woocommerce_blocks_payment_gateway_features_list) + - [deprecated_function_trigger_error](#deprecated_function_trigger_error) + - [loop_shop_per_page](#loop_shop_per_page) + - [wc_session_expiration](#wc_session_expiration) + - [woocommerce_add_cart_item](#woocommerce_add_cart_item) + - [woocommerce_add_cart_item_data](#woocommerce_add_cart_item_data) + - [woocommerce_add_to_cart_quantity](#woocommerce_add_to_cart_quantity) + - [woocommerce_add_to_cart_sold_individually_quantity](#woocommerce_add_to_cart_sold_individually_quantity) + - [woocommerce_add_to_cart_validation](#woocommerce_add_to_cart_validation) + - [woocommerce_adjust_non_base_location_prices](#woocommerce_adjust_non_base_location_prices) + - [woocommerce_apply_base_tax_for_local_pickup](#woocommerce_apply_base_tax_for_local_pickup) + - [woocommerce_apply_individual_use_coupon](#woocommerce_apply_individual_use_coupon) + - [woocommerce_apply_with_individual_use_coupon](#woocommerce_apply_with_individual_use_coupon) + - [woocommerce_blocks_hook_compatibility_additional_data](#woocommerce_blocks_hook_compatibility_additional_data) + - [woocommerce_blocks_product_grid_is_cacheable](#woocommerce_blocks_product_grid_is_cacheable) + - [woocommerce_blocks_product_grid_item_html](#woocommerce_blocks_product_grid_item_html) + - [woocommerce_blocks_register_script_dependencies](#woocommerce_blocks_register_script_dependencies) + - [woocommerce_cart_contents_changed](#woocommerce_cart_contents_changed) + - [woocommerce_cart_item_permalink](#woocommerce_cart_item_permalink) + - [woocommerce_disable_compatibility_layer](#woocommerce_disable_compatibility_layer) + - [woocommerce_ga_disable_tracking](#woocommerce_ga_disable_tracking) + - [woocommerce_get_item_data](#woocommerce_get_item_data) + - [woocommerce_loop_add_to_cart_args](#woocommerce_loop_add_to_cart_args) + - [woocommerce_loop_add_to_cart_link](#woocommerce_loop_add_to_cart_link) + - [woocommerce_new_customer_data](#woocommerce_new_customer_data) + - [woocommerce_pay_order_product_has_enough_stock](#woocommerce_pay_order_product_has_enough_stock) + - [woocommerce_pay_order_product_in_stock](#woocommerce_pay_order_product_in_stock) + - [woocommerce_registration_errors](#woocommerce_registration_errors) + - [woocommerce_shared_settings](#woocommerce_shared_settings) + - [woocommerce_shipping_package_name](#woocommerce_shipping_package_name) + - [woocommerce_shipping_{$this->id}_is_available](#woocommerce_shipping_this-id_is_available) + - [woocommerce_show_page_title](#woocommerce_show_page_title) + - [woocommerce_single_product_image_thumbnail_html](#woocommerce_single_product_image_thumbnail_html) + - [woocommerce_store_api_add_to_cart_data](#woocommerce_store_api_add_to_cart_data) + - [woocommerce_store_api_disable_nonce_check](#woocommerce_store_api_disable_nonce_check) + - [woocommerce_store_api_product_quantity_limit](#woocommerce_store_api_product_quantity_limit) + - [woocommerce_store_api_product_quantity_{$value_type}](#woocommerce_store_api_product_quantity_value_type) + - [woocommerce_store_api_rate_limit_options](#woocommerce_store_api_rate_limit_options) --- -## \_\_experimental_woocommerce_blocks_add_data_attributes_to_block +## __experimental_woocommerce_blocks_add_data_attributes_to_block + Filters the list of allowed Block Names @@ -58,17 +65,19 @@ apply_filters( '__experimental_woocommerce_blocks_add_data_attributes_to_block', ### Parameters -| Argument | Type | Description | -| ------------------- | ----- | ------------------- | +| Argument | Type | Description | +| -------- | ---- | ----------- | | $allowed_namespaces | array | List of namespaces. | ### Source -- [BlockTypesController.php](../../../../src/BlockTypesController.php) + + - [BlockTypesController.php](../../../../src/BlockTypesController.php) --- -## \_\_experimental_woocommerce_blocks_add_data_attributes_to_namespace +## __experimental_woocommerce_blocks_add_data_attributes_to_namespace + Filters the list of allowed block namespaces. @@ -82,17 +91,19 @@ apply_filters( '__experimental_woocommerce_blocks_add_data_attributes_to_namespa ### Parameters -| Argument | Type | Description | -| ------------------- | ----- | ------------------- | +| Argument | Type | Description | +| -------- | ---- | ----------- | | $allowed_namespaces | array | List of namespaces. | ### Source -- [BlockTypesController.php](../../../../src/BlockTypesController.php) + + - [BlockTypesController.php](../../../../src/BlockTypesController.php) --- -## \_\_experimental_woocommerce_blocks_payment_gateway_features_list +## __experimental_woocommerce_blocks_payment_gateway_features_list + Filter to control what features are available for each payment gateway. @@ -102,13 +113,14 @@ apply_filters( '__experimental_woocommerce_blocks_payment_gateway_features_list' ### Parameters -| Argument | Type | Description | -| --------- | ------ | --------------------------- | -| $features | array | List of supported features. | -| $name | string | Gateway name. | +| Argument | Type | Description | +| -------- | ---- | ----------- | +| $features | array | List of supported features. | +| $name | string | Gateway name. | ### Returns + `array` Updated list of supported features. ### Example @@ -128,14 +140,17 @@ function my_function_callback( $features, $gateway ) { add_filter( '__experimental_woocommerce_blocks_payment_gateway_features_list', 'my_function_callback', 10, 2 ); ``` + ### Source -- [Payments/Integrations/PayPal.php](../../../../src/Payments/Integrations/PayPal.php) + + - [Payments/Integrations/PayPal.php](../../../../src/Payments/Integrations/PayPal.php) --- ## deprecated_function_trigger_error + Filters whether to trigger an error for deprecated functions. (Same as WP core) ```php @@ -144,18 +159,37 @@ apply_filters( 'deprecated_function_trigger_error', bool $trigger ) ### Parameters -| Argument | Type | Description | -| -------- | ---- | -------------------------------------------------------------------- | +| Argument | Type | Description | +| -------- | ---- | ----------- | | $trigger | bool | Whether to trigger the error for deprecated functions. Default true. | ### Source -- [Domain/Bootstrap.php](../../../../src/Domain/Bootstrap.php) + + - [Domain/Bootstrap.php](../../../../src/Domain/Bootstrap.php) + +--- + +## loop_shop_per_page + + + + +```php +apply_filters( 'loop_shop_per_page' ) +``` + +### Source + + + - [BlockTypes/ProductQuery.php](../../../../src/BlockTypes/ProductQuery.php) + - [BlockTypes/ProductCollection.php](../../../../src/BlockTypes/ProductCollection.php) --- ## wc_session_expiration + Filters the session expiration. ```php @@ -164,110 +198,148 @@ apply_filters( 'wc_session_expiration', int $expiration ) ### Parameters -| Argument | Type | Description | -| ----------- | ---- | ---------------------- | -| $expiration | int | Expiration in seconds. | +| Argument | Type | Description | +| -------- | ---- | ----------- | +| $expiration | int | Expiration in seconds. | ### Source -- [StoreApi/Routes/V1/AbstractCartRoute.php](../../../../src/StoreApi/Routes/V1/AbstractCartRoute.php) + + - [StoreApi/Routes/V1/AbstractCartRoute.php](../../../../src/StoreApi/Routes/V1/AbstractCartRoute.php) --- ## woocommerce_add_cart_item + Filters the item being added to the cart. ```php apply_filters( 'woocommerce_add_cart_item', array $cart_item_data, string $cart_id ) ``` + **Note: Matches filter name in WooCommerce core.** ### Parameters -| Argument | Type | Description | -| --------------- | ------ | ------------------------------------------------ | -| $cart_item_data | array | Array of cart item data being added to the cart. | -| $cart_id | string | Id of the item in the cart. | +| Argument | Type | Description | +| -------- | ---- | ----------- | +| $cart_item_data | array | Array of cart item data being added to the cart. | +| $cart_id | string | Id of the item in the cart. | ### Returns + `array` Updated cart item data. ### Source -- [StoreApi/Utilities/CartController.php](../../../../src/StoreApi/Utilities/CartController.php) + + - [StoreApi/Utilities/CartController.php](../../../../src/StoreApi/Utilities/CartController.php) --- ## woocommerce_add_cart_item_data + Filter cart item data for add to cart requests. ```php apply_filters( 'woocommerce_add_cart_item_data', array $cart_item_data, integer $product_id, integer $variation_id, integer $quantity ) ``` + **Note: Matches filter name in WooCommerce core.** ### Parameters -| Argument | Type | Description | -| --------------- | ------- | ---------------------------------------------- | -| $cart_item_data | array | Array of other cart item data. | -| $product_id | integer | ID of the product added to the cart. | -| $variation_id | integer | Variation ID of the product added to the cart. | -| $quantity | integer | Quantity of the item added to the cart. | +| Argument | Type | Description | +| -------- | ---- | ----------- | +| $cart_item_data | array | Array of other cart item data. | +| $product_id | integer | ID of the product added to the cart. | +| $variation_id | integer | Variation ID of the product added to the cart. | +| $quantity | integer | Quantity of the item added to the cart. | ### Returns -`array` + +`array` ### Source -- [StoreApi/Utilities/CartController.php](../../../../src/StoreApi/Utilities/CartController.php) + + - [StoreApi/Utilities/CartController.php](../../../../src/StoreApi/Utilities/CartController.php) + +--- + +## woocommerce_add_to_cart_quantity + + +Filters the change the quantity to add to cart. + +```php +apply_filters( 'woocommerce_add_to_cart_quantity', \Automattic\WooCommerce\Blocks\BlockTypes\number $default_quantity, \Automattic\WooCommerce\Blocks\BlockTypes\number $product_id ) +``` + +### Parameters + +| Argument | Type | Description | +| -------- | ---- | ----------- | +| $default_quantity | \Automattic\WooCommerce\Blocks\BlockTypes\number | The default quantity. | +| $product_id | \Automattic\WooCommerce\Blocks\BlockTypes\number | The product id. | + +### Source + + + - [BlockTypes/ProductButton.php](../../../../src/BlockTypes/ProductButton.php) --- ## woocommerce_add_to_cart_sold_individually_quantity + Filter sold individually quantity for add to cart requests. ```php apply_filters( 'woocommerce_add_to_cart_sold_individually_quantity', integer $sold_individually_quantity, integer $quantity, integer $product_id, integer $variation_id, array $cart_item_data ) ``` + **Note: Matches filter name in WooCommerce core.** ### Parameters -| Argument | Type | Description | -| --------------------------- | ------- | ---------------------------------------------- | -| $sold_individually_quantity | integer | Defaults to 1. | -| $quantity | integer | Quantity of the item added to the cart. | -| $product_id | integer | ID of the product added to the cart. | -| $variation_id | integer | Variation ID of the product added to the cart. | -| $cart_item_data | array | Array of other cart item data. | +| Argument | Type | Description | +| -------- | ---- | ----------- | +| $sold_individually_quantity | integer | Defaults to 1. | +| $quantity | integer | Quantity of the item added to the cart. | +| $product_id | integer | ID of the product added to the cart. | +| $variation_id | integer | Variation ID of the product added to the cart. | +| $cart_item_data | array | Array of other cart item data. | ### Returns -`integer` + +`integer` ### Source -- [StoreApi/Utilities/CartController.php](../../../../src/StoreApi/Utilities/CartController.php) + + - [StoreApi/Utilities/CartController.php](../../../../src/StoreApi/Utilities/CartController.php) --- ## ~~woocommerce_add_to_cart_validation~~ + Filters if an item being added to the cart passed validation checks. ```php apply_filters( 'woocommerce_add_to_cart_validation', boolean $passed_validation, integer $product_id, integer $quantity, integer $variation_id, array $variation ) ``` + **Deprecated: This hook is deprecated and will be removed** ### Description @@ -276,32 +348,36 @@ apply_filters( 'woocommerce_add_to_cart_validation', boolean $passed_validation, ### Parameters -| Argument | Type | Description | -| ------------------ | ------- | ------------------------------------- | -| $passed_validation | boolean | True if the item passed validation. | -| $product_id | integer | Product ID being validated. | -| $quantity | integer | Quantity added to the cart. | -| $variation_id | integer | Variation ID being added to the cart. | -| $variation | array | Variation data. | +| Argument | Type | Description | +| -------- | ---- | ----------- | +| $passed_validation | boolean | True if the item passed validation. | +| $product_id | integer | Product ID being validated. | +| $quantity | integer | Quantity added to the cart. | +| $variation_id | integer | Variation ID being added to the cart. | +| $variation | array | Variation data. | ### Returns -`boolean` + +`boolean` ### Source -- [StoreApi/Utilities/CartController.php](../../../../src/StoreApi/Utilities/CartController.php) + + - [StoreApi/Utilities/CartController.php](../../../../src/StoreApi/Utilities/CartController.php) --- ## woocommerce_adjust_non_base_location_prices + Filters if taxes should be removed from locations outside the store base location. ```php apply_filters( 'woocommerce_adjust_non_base_location_prices', boolean $adjust_non_base_location_prices ) ``` + **Note: Matches filter name in WooCommerce core.** ### Description @@ -310,91 +386,106 @@ apply_filters( 'woocommerce_adjust_non_base_location_prices', boolean $adjust_no ### Parameters -| Argument | Type | Description | -| -------------------------------- | ------- | ---------------- | +| Argument | Type | Description | +| -------- | ---- | ----------- | | $adjust_non_base_location_prices | boolean | True by default. | ### Returns -`boolean` + +`boolean` ### Source -- [StoreApi/Utilities/ProductQuery.php](../../../../src/StoreApi/Utilities/ProductQuery.php) + + - [StoreApi/Utilities/ProductQuery.php](../../../../src/StoreApi/Utilities/ProductQuery.php) --- ## woocommerce_apply_base_tax_for_local_pickup + + + ```php apply_filters( 'woocommerce_apply_base_tax_for_local_pickup' ) ``` ### Source -- [Shipping/ShippingController.php](../../../../src/Shipping/ShippingController.php) + + - [Shipping/ShippingController.php](../../../../src/Shipping/ShippingController.php) --- ## woocommerce_apply_individual_use_coupon + Filter coupons to remove when applying an individual use coupon. ```php apply_filters( 'woocommerce_apply_individual_use_coupon', array $coupons, \WC_Coupon $coupon, array $applied_coupons ) ``` + **Note: Matches filter name in WooCommerce core.** ### Parameters -| Argument | Type | Description | -| ---------------- | ---------- | ----------------------------------------------------- | -| $coupons | array | Array of coupons to remove from the cart. | -| $coupon | \WC_Coupon | Coupon object applied to the cart. | -| $applied_coupons | array | Array of applied coupons already applied to the cart. | +| Argument | Type | Description | +| -------- | ---- | ----------- | +| $coupons | array | Array of coupons to remove from the cart. | +| $coupon | \WC_Coupon | Coupon object applied to the cart. | +| $applied_coupons | array | Array of applied coupons already applied to the cart. | ### Returns -`array` + +`array` ### Source -- [StoreApi/Utilities/CartController.php](../../../../src/StoreApi/Utilities/CartController.php) + + - [StoreApi/Utilities/CartController.php](../../../../src/StoreApi/Utilities/CartController.php) --- ## woocommerce_apply_with_individual_use_coupon + Filters if a coupon can be applied alongside other individual use coupons. ```php apply_filters( 'woocommerce_apply_with_individual_use_coupon', boolean $apply_with_individual_use_coupon, \WC_Coupon $coupon, \WC_Coupon $individual_use_coupon, array $applied_coupons ) ``` + **Note: Matches filter name in WooCommerce core.** ### Parameters -| Argument | Type | Description | -| --------------------------------- | ---------- | ----------------------------------------------------- | -| $apply_with_individual_use_coupon | boolean | Defaults to false. | -| $coupon | \WC_Coupon | Coupon object applied to the cart. | -| $individual_use_coupon | \WC_Coupon | Individual use coupon already applied to the cart. | -| $applied_coupons | array | Array of applied coupons already applied to the cart. | +| Argument | Type | Description | +| -------- | ---- | ----------- | +| $apply_with_individual_use_coupon | boolean | Defaults to false. | +| $coupon | \WC_Coupon | Coupon object applied to the cart. | +| $individual_use_coupon | \WC_Coupon | Individual use coupon already applied to the cart. | +| $applied_coupons | array | Array of applied coupons already applied to the cart. | ### Returns -`boolean` + +`boolean` ### Source -- [StoreApi/Utilities/CartController.php](../../../../src/StoreApi/Utilities/CartController.php) + + - [StoreApi/Utilities/CartController.php](../../../../src/StoreApi/Utilities/CartController.php) --- ## woocommerce_blocks_hook_compatibility_additional_data + When extensions implement their equivalent blocks of the template hook functions, they can use this filter to register their old hooked data here, so in the blockified template, the old hooked functions can be removed in favor of the new blocks while keeping the old hooked functions working in classic templates. ```php @@ -407,18 +498,20 @@ apply_filters( 'woocommerce_blocks_hook_compatibility_additional_data', array $d ### Parameters -| Argument | Type | Description | -| -------- | ----- | ---------------------------------------- | -| $data | array | Additional hooked data. Default to empty | +| Argument | Type | Description | +| -------- | ---- | ----------- | +| $data | array | Additional hooked data. Default to empty | ### Source -- [Templates/AbstractTemplateCompatibility.php](../../../../src/Templates/AbstractTemplateCompatibility.php) + + - [Templates/AbstractTemplateCompatibility.php](../../../../src/Templates/AbstractTemplateCompatibility.php) --- ## woocommerce_blocks_product_grid_is_cacheable + Filters whether or not the product grid is cacheable. ```php @@ -427,23 +520,26 @@ apply_filters( 'woocommerce_blocks_product_grid_is_cacheable', boolean $is_cache ### Parameters -| Argument | Type | Description | -| ------------- | ------- | ---------------------------------------------------------- | -| $is_cacheable | boolean | The list of script dependencies. | -| $query_args | array | Query args for the products query passed to BlocksWpQuery. | +| Argument | Type | Description | +| -------- | ---- | ----------- | +| $is_cacheable | boolean | The list of script dependencies. | +| $query_args | array | Query args for the products query passed to BlocksWpQuery. | ### Returns + `array` True to enable cache, false to disable cache. ### Source -- [BlockTypes/AbstractProductGrid.php](../../../../src/BlockTypes/AbstractProductGrid.php) + + - [BlockTypes/AbstractProductGrid.php](../../../../src/BlockTypes/AbstractProductGrid.php) --- ## woocommerce_blocks_product_grid_item_html + Filters the HTML for products in the grid. ```php @@ -452,24 +548,27 @@ apply_filters( 'woocommerce_blocks_product_grid_item_html', string $html, array ### Parameters -| Argument | Type | Description | -| -------- | ----------- | ------------------------------------ | -| $html | string | Product grid item HTML. | -| $data | array | Product data passed to the template. | -| $product | \WC_Product | Product object. | +| Argument | Type | Description | +| -------- | ---- | ----------- | +| $html | string | Product grid item HTML. | +| $data | array | Product data passed to the template. | +| $product | \WC_Product | Product object. | ### Returns + `string` Updated product grid item HTML. ### Source -- [BlockTypes/AbstractProductGrid.php](../../../../src/BlockTypes/AbstractProductGrid.php) + + - [BlockTypes/AbstractProductGrid.php](../../../../src/BlockTypes/AbstractProductGrid.php) --- ## woocommerce_blocks_register_script_dependencies + Filters the list of script dependencies. ```php @@ -478,49 +577,84 @@ apply_filters( 'woocommerce_blocks_register_script_dependencies', array $depende ### Parameters -| Argument | Type | Description | -| ------------- | ------ | -------------------------------- | -| $dependencies | array | The list of script dependencies. | -| $handle | string | The script's handle. | +| Argument | Type | Description | +| -------- | ---- | ----------- | +| $dependencies | array | The list of script dependencies. | +| $handle | string | The script's handle. | ### Returns -`array` + +`array` ### Source -- [Assets/Api.php](../../../../src/Assets/Api.php) + + - [Assets/Api.php](../../../../src/Assets/Api.php) --- ## woocommerce_cart_contents_changed + Filters the entire cart contents when the cart changes. ```php apply_filters( 'woocommerce_cart_contents_changed', array $cart_contents ) ``` + **Note: Matches filter name in WooCommerce core.** ### Parameters -| Argument | Type | Description | -| -------------- | ----- | ------------------------ | +| Argument | Type | Description | +| -------- | ---- | ----------- | | $cart_contents | array | Array of all cart items. | ### Returns + `array` Updated array of all cart items. ### Source -- [StoreApi/Utilities/CartController.php](../../../../src/StoreApi/Utilities/CartController.php) + + - [StoreApi/Utilities/CartController.php](../../../../src/StoreApi/Utilities/CartController.php) + +--- + +## woocommerce_cart_item_permalink + + +Filter the product permalink. + +```php +apply_filters( 'woocommerce_cart_item_permalink', string $product_permalink, array $cart_item, string $cart_item_key ) +``` + +### Description + +This is a hook taken from the legacy cart/mini-cart templates that allows the permalink to be changed for a product. This is specific to the cart endpoint.
+ +### Parameters + +| Argument | Type | Description | +| -------- | ---- | ----------- | +| $product_permalink | string | Product permalink. | +| $cart_item | array | Cart item array. | +| $cart_item_key | string | Cart item key. | + +### Source + + + - [StoreApi/Schemas/V1/CartItemSchema.php](../../../../src/StoreApi/Schemas/V1/CartItemSchema.php) --- ## woocommerce_disable_compatibility_layer + Filter to disable the compatibility layer for the blockified templates. ```php @@ -533,47 +667,53 @@ apply_filters( 'woocommerce_disable_compatibility_layer', \Automattic\WooCommerc ### Parameters -| Argument | Type | Description | -| -------- | ------------------------------------------------- | ----------- | -| 1 | \Automattic\WooCommerce\Blocks\Templates\boolean. | | +| Argument | Type | Description | +| -------- | ---- | ----------- | +| 1 | \Automattic\WooCommerce\Blocks\Templates\boolean. | | ### Source -- [Templates/AbstractTemplateCompatibility.php](../../../../src/Templates/AbstractTemplateCompatibility.php) -- [Templates/AbstractTemplateCompatibility.php](../../../../src/Templates/AbstractTemplateCompatibility.php) + + - [Templates/AbstractTemplateCompatibility.php](../../../../src/Templates/AbstractTemplateCompatibility.php) + - [Templates/AbstractTemplateCompatibility.php](../../../../src/Templates/AbstractTemplateCompatibility.php) --- ## woocommerce_ga_disable_tracking + Filter to disable Google Analytics tracking. ```php apply_filters( 'woocommerce_ga_disable_tracking', boolean $disable_tracking ) ``` + **Note: Matches filter name in GA extension.** ### Parameters -| Argument | Type | Description | -| ----------------- | ------- | ----------------------------------- | +| Argument | Type | Description | +| -------- | ---- | ----------- | | $disable_tracking | boolean | If true, tracking will be disabled. | ### Source -- [Domain/Services/GoogleAnalytics.php](../../../../src/Domain/Services/GoogleAnalytics.php) + + - [Domain/Services/GoogleAnalytics.php](../../../../src/Domain/Services/GoogleAnalytics.php) --- ## woocommerce_get_item_data + Filters cart item data. ```php apply_filters( 'woocommerce_get_item_data', array $item_data, array $cart_item ) ``` + **Note: Matches filter name in WooCommerce core.** ### Description @@ -582,23 +722,26 @@ apply_filters( 'woocommerce_get_item_data', array $item_data, array $cart_item ) ### Parameters -| Argument | Type | Description | -| ---------- | ----- | --------------------------------- | +| Argument | Type | Description | +| -------- | ---- | ----------- | | $item_data | array | Cart item data. Empty by default. | -| $cart_item | array | Cart item array. | +| $cart_item | array | Cart item array. | ### Returns -`array` + +`array` ### Source -- [StoreApi/Schemas/V1/CartItemSchema.php](../../../../src/StoreApi/Schemas/V1/CartItemSchema.php) + + - [StoreApi/Schemas/V1/CartItemSchema.php](../../../../src/StoreApi/Schemas/V1/CartItemSchema.php) --- ## woocommerce_loop_add_to_cart_args + Allow filtering of the add to cart button arguments. ```php @@ -607,12 +750,14 @@ apply_filters( 'woocommerce_loop_add_to_cart_args' ) ### Source -- [BlockTypes/ProductButton.php](../../../../src/BlockTypes/ProductButton.php) + + - [BlockTypes/ProductButton.php](../../../../src/BlockTypes/ProductButton.php) --- ## woocommerce_loop_add_to_cart_link + Filters the add to cart button class. ```php @@ -621,18 +766,20 @@ apply_filters( 'woocommerce_loop_add_to_cart_link', string $class ) ### Parameters -| Argument | Type | Description | -| -------- | ------ | ----------- | -| $class | string | The class. | +| Argument | Type | Description | +| -------- | ---- | ----------- | +| $class | string | The class. | ### Source -- [BlockTypes/ProductButton.php](../../../../src/BlockTypes/ProductButton.php) + + - [BlockTypes/ProductButton.php](../../../../src/BlockTypes/ProductButton.php) --- ## woocommerce_new_customer_data + Filters customer data before a customer account is registered. ```php @@ -645,28 +792,80 @@ apply_filters( 'woocommerce_new_customer_data', array $customer_data ) ### Parameters -| Argument | Type | Description | -| -------------- | ----- | --------------------------------- | +| Argument | Type | Description | +| -------- | ---- | ----------- | | $customer_data | array | An array of customer (user) data. | ### Returns -`array` + +`array` ### Source -- [StoreApi/Routes/V1/Checkout.php](../../../../src/StoreApi/Routes/V1/Checkout.php) + + - [StoreApi/Routes/V1/Checkout.php](../../../../src/StoreApi/Routes/V1/Checkout.php) + +--- + +## woocommerce_pay_order_product_has_enough_stock + + +Filters whether or not the product has enough stock. + +```php +apply_filters( 'woocommerce_pay_order_product_has_enough_stock', boolean $argument0, \WC_Product $product, \WC_Order $order ) +``` + +### Parameters + +| Argument | Type | Description | +| -------- | ---- | ----------- | +| 1 | boolean | True if has enough stock. | +| $product | \WC_Product | Product. | +| $order | \WC_Order | Order. | + +### Source + + + - [StoreApi/Utilities/OrderController.php](../../../../src/StoreApi/Utilities/OrderController.php) + +--- + +## woocommerce_pay_order_product_in_stock + + +Filters whether or not the product is in stock for this pay for order. + +```php +apply_filters( 'woocommerce_pay_order_product_in_stock', boolean $argument0, \WC_Product $product, \WC_Order $order ) +``` + +### Parameters + +| Argument | Type | Description | +| -------- | ---- | ----------- | +| 1 | boolean | True if in stock. | +| $product | \WC_Product | Product. | +| $order | \WC_Order | Order. | + +### Source + + + - [StoreApi/Utilities/OrderController.php](../../../../src/StoreApi/Utilities/OrderController.php) --- ## woocommerce_registration_errors + Filters registration errors before a customer account is registered. ```php apply_filters( 'woocommerce_registration_errors', \WP_Error $errors, string $username, string $user_email ) ``` + **Note: Matches filter name in WooCommerce core.** ### Description @@ -675,30 +874,34 @@ apply_filters( 'woocommerce_registration_errors', \WP_Error $errors, string $use ### Parameters -| Argument | Type | Description | -| ----------- | --------- | ----------------------- | -| $errors | \WP_Error | Error object. | -| $username | string | Customer username. | -| $user_email | string | Customer email address. | +| Argument | Type | Description | +| -------- | ---- | ----------- | +| $errors | \WP_Error | Error object. | +| $username | string | Customer username. | +| $user_email | string | Customer email address. | ### Returns -`\WP_Error` + +`\WP_Error` ### Source -- [StoreApi/Routes/V1/Checkout.php](../../../../src/StoreApi/Routes/V1/Checkout.php) + + - [StoreApi/Routes/V1/Checkout.php](../../../../src/StoreApi/Routes/V1/Checkout.php) --- ## ~~woocommerce_shared_settings~~ + Filters the array of shared settings. ```php apply_filters( 'woocommerce_shared_settings', array $data ) ``` + **Deprecated: This hook is deprecated and will be removed** ### Description @@ -707,49 +910,58 @@ apply_filters( 'woocommerce_shared_settings', array $data ) ### Parameters -| Argument | Type | Description | -| -------- | ----- | -------------- | -| $data | array | Settings data. | +| Argument | Type | Description | +| -------- | ---- | ----------- | +| $data | array | Settings data. | ### Returns -`array` + +`array` ### Source -- [Assets/AssetDataRegistry.php](../../../../src/Assets/AssetDataRegistry.php) + + - [Assets/AssetDataRegistry.php](../../../../src/Assets/AssetDataRegistry.php) --- ## woocommerce_shipping_package_name + Filters the shipping package name. ```php apply_filters( 'woocommerce_shipping_package_name', string $shipping_package_name, string $package_id, array $package ) ``` + **Note: Matches filter name in WooCommerce core.** ### Parameters -| Argument | Type | Description | -| ---------------------- | ------ | ---------------------------------- | -| $shipping_package_name | string | Shipping package name. | -| $package_id | string | Shipping package ID. | -| $package | array | Shipping package from WooCommerce. | +| Argument | Type | Description | +| -------- | ---- | ----------- | +| $shipping_package_name | string | Shipping package name. | +| $package_id | string | Shipping package ID. | +| $package | array | Shipping package from WooCommerce. | ### Returns + `string` Shipping package name. ### Source -- [StoreApi/Utilities/CartController.php](../../../../src/StoreApi/Utilities/CartController.php) + + - [StoreApi/Utilities/CartController.php](../../../../src/StoreApi/Utilities/CartController.php) --- -## woocommerce*shipping*{$this->id}\_is_available +## woocommerce_shipping_{$this->id}_is_available + + + ```php apply_filters( 'woocommerce_shipping_{$this->id}_is_available' ) @@ -757,12 +969,14 @@ apply_filters( 'woocommerce_shipping_{$this->id}_is_available' ) ### Source -- [Shipping/PickupLocation.php](../../../../src/Shipping/PickupLocation.php) + + - [Shipping/PickupLocation.php](../../../../src/Shipping/PickupLocation.php) --- ## woocommerce_show_page_title + Hook: woocommerce_show_page_title ```php @@ -775,12 +989,37 @@ apply_filters( 'woocommerce_show_page_title' ) ### Source -- [BlockTypes/ClassicTemplate.php](../../../../src/BlockTypes/ClassicTemplate.php) + + - [BlockTypes/ClassicTemplate.php](../../../../src/BlockTypes/ClassicTemplate.php) + +--- + +## woocommerce_single_product_image_thumbnail_html + + +Filter the HTML markup for a single product image thumbnail in the gallery. + +```php +apply_filters( 'woocommerce_single_product_image_thumbnail_html', string $thumbnail_html, int $attachment_id ) +``` + +### Parameters + +| Argument | Type | Description | +| -------- | ---- | ----------- | +| $thumbnail_html | string | The HTML markup for the thumbnail. | +| $attachment_id | int | The attachment ID of the thumbnail. | + +### Source + + + - [BlockTypes/ProductGalleryThumbnails.php](../../../../src/BlockTypes/ProductGalleryThumbnails.php) --- ## woocommerce_store_api_add_to_cart_data + Filters cart item data sent via the API before it is passed to the cart controller. ```php @@ -793,22 +1032,25 @@ apply_filters( 'woocommerce_store_api_add_to_cart_data', array $customer_data ) ### Parameters -| Argument | Type | Description | -| -------------- | ----- | --------------------------------- | +| Argument | Type | Description | +| -------- | ---- | ----------- | | $customer_data | array | An array of customer (user) data. | ### Returns -`array` + +`array` ### Source -- [StoreApi/Routes/V1/CartAddItem.php](../../../../src/StoreApi/Routes/V1/CartAddItem.php) + + - [StoreApi/Routes/V1/CartAddItem.php](../../../../src/StoreApi/Routes/V1/CartAddItem.php) --- ## woocommerce_store_api_disable_nonce_check + Filters the Store API nonce check. ```php @@ -821,22 +1063,25 @@ apply_filters( 'woocommerce_store_api_disable_nonce_check', boolean $disable_non ### Parameters -| Argument | Type | Description | -| -------------------- | ------- | --------------------------------------- | +| Argument | Type | Description | +| -------- | ---- | ----------- | | $disable_nonce_check | boolean | If true, nonce checks will be disabled. | ### Returns -`boolean` + +`boolean` ### Source -- [StoreApi/Routes/V1/AbstractCartRoute.php](../../../../src/StoreApi/Routes/V1/AbstractCartRoute.php) + + - [StoreApi/Routes/V1/AbstractCartRoute.php](../../../../src/StoreApi/Routes/V1/AbstractCartRoute.php) --- ## woocommerce_store_api_product_quantity_limit + Filters the quantity limit for a product being added to the cart via the Store API. ```php @@ -849,22 +1094,25 @@ apply_filters( 'woocommerce_store_api_product_quantity_limit', integer $quantity ### Parameters -| Argument | Type | Description | -| --------------- | ----------- | --------------------------------------------------------------- | -| $quantity_limit | integer | Quantity limit which defaults to 9999 unless sold individually. | -| $product | \WC_Product | Product instance. | +| Argument | Type | Description | +| -------- | ---- | ----------- | +| $quantity_limit | integer | Quantity limit which defaults to 9999 unless sold individually. | +| $product | \WC_Product | Product instance. | ### Returns -`integer` + +`integer` ### Source -- [StoreApi/Utilities/QuantityLimits.php](../../../../src/StoreApi/Utilities/QuantityLimits.php) + + - [StoreApi/Utilities/QuantityLimits.php](../../../../src/StoreApi/Utilities/QuantityLimits.php) --- -## woocommerce*store_api_product_quantity*{$value_type} +## woocommerce_store_api_product_quantity_{$value_type} + 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. @@ -878,24 +1126,27 @@ apply_filters( 'woocommerce_store_api_product_quantity_{$value_type}', mixed $va ### Parameters -| Argument | Type | Description | -| ---------- | ----------- | --------------------------------------------------------- | -| $value | mixed | The value being filtered. | -| $product | \WC_Product | The product object. | +| Argument | Type | Description | +| -------- | ---- | ----------- | +| $value | mixed | The value being filtered. | +| $product | \WC_Product | The product object. | | $cart_item | array, null | The cart item if the product exists in the cart, or null. | ### Returns -`mixed` + +`mixed` ### Source -- [StoreApi/Utilities/QuantityLimits.php](../../../../src/StoreApi/Utilities/QuantityLimits.php) + + - [StoreApi/Utilities/QuantityLimits.php](../../../../src/StoreApi/Utilities/QuantityLimits.php) --- ## woocommerce_store_api_rate_limit_options + Filters options for Rate Limits. ```php @@ -904,53 +1155,21 @@ apply_filters( 'woocommerce_store_api_rate_limit_options', array $rate_limit_opt ### Parameters -| Argument | Type | Description | -| ------------------- | ----- | ----------------------- | +| Argument | Type | Description | +| -------- | ---- | ----------- | | $rate_limit_options | array | Array of option values. | ### Returns -`array` + +`array` ### Source -- [StoreApi/Utilities/RateLimits.php](../../../../src/StoreApi/Utilities/RateLimits.php) + + - [StoreApi/Utilities/RateLimits.php](../../../../src/StoreApi/Utilities/RateLimits.php) --- - -## woocommerce_variation_option_name - -Filters the variation option name. - -```php -apply_filters( 'woocommerce_variation_option_name', string $value, null $unused, string $taxonomy, \WC_Product $product ) -``` - -**Note: Matches filter name in WooCommerce core.** - -### Description - -Filters the variation option name for custom option slugs.
- -### Parameters - -| Argument | Type | Description | -| --------- | ----------- | ------------------------------------------------ | -| $value | string | The name to display. | -| $unused | null | Unused because this is not a variation taxonomy. | -| $taxonomy | string | Taxonomy or product attribute name. | -| $product | \WC_Product | Product data. | - -### Returns - -`string` - -### Source - -- [StoreApi/Schemas/V1/CartItemSchema.php](../../../../src/StoreApi/Schemas/V1/CartItemSchema.php) - ---- - --- @@ -960,3 +1179,4 @@ apply_filters( 'woocommerce_variation_option_name', string $value, null $unused, 🐞 Found a mistake, or have a suggestion? [Leave feedback about this document here.](https://github.com/woocommerce/woocommerce-blocks/issues/new?assignees=&labels=type%3A+documentation&template=--doc-feedback.md&title=Feedback%20on%20./docs/third-party-developers/extensibility/hooks/filters.md) + diff --git a/plugins/woocommerce-blocks/docs/third-party-developers/extensibility/rest-api/available-endpoints-to-extend.md b/plugins/woocommerce-blocks/docs/third-party-developers/extensibility/rest-api/available-endpoints-to-extend.md index a4cc473f14f..c41ed73fb1d 100644 --- a/plugins/woocommerce-blocks/docs/third-party-developers/extensibility/rest-api/available-endpoints-to-extend.md +++ b/plugins/woocommerce-blocks/docs/third-party-developers/extensibility/rest-api/available-endpoints-to-extend.md @@ -80,3 +80,4 @@ The main products endpoint is extensible via ExtendSchema. The data is available 🐞 Found a mistake, or have a suggestion? [Leave feedback about this document here.](https://github.com/woocommerce/woocommerce-blocks/issues/new?assignees=&labels=type%3A+documentation&template=--doc-feedback.md&title=Feedback%20on%20./docs/third-party-developers/extensibility/rest-api/available-endpoints-to-extend.md) + diff --git a/plugins/woocommerce-blocks/docs/third-party-developers/extensibility/rest-api/extend-rest-api-add-data.md b/plugins/woocommerce-blocks/docs/third-party-developers/extensibility/rest-api/extend-rest-api-add-data.md index 69ce0b5ea65..ef9abeb3577 100644 --- a/plugins/woocommerce-blocks/docs/third-party-developers/extensibility/rest-api/extend-rest-api-add-data.md +++ b/plugins/woocommerce-blocks/docs/third-party-developers/extensibility/rest-api/extend-rest-api-add-data.md @@ -337,3 +337,4 @@ You may wish to use our pre-existing Formatters to ensure your data is passed th 🐞 Found a mistake, or have a suggestion? [Leave feedback about this document here.](https://github.com/woocommerce/woocommerce-blocks/issues/new?assignees=&labels=type%3A+documentation&template=--doc-feedback.md&title=Feedback%20on%20./docs/third-party-developers/extensibility/rest-api/extend-rest-api-add-data.md) + diff --git a/plugins/woocommerce-blocks/docs/third-party-developers/extensibility/rest-api/extend-rest-api-formatters.md b/plugins/woocommerce-blocks/docs/third-party-developers/extensibility/rest-api/extend-rest-api-formatters.md index ab6c9075382..4f95abb85b8 100644 --- a/plugins/woocommerce-blocks/docs/third-party-developers/extensibility/rest-api/extend-rest-api-formatters.md +++ b/plugins/woocommerce-blocks/docs/third-party-developers/extensibility/rest-api/extend-rest-api-formatters.md @@ -142,3 +142,4 @@ alert('bad script!') This “coffee” is very strong. 🐞 Found a mistake, or have a suggestion? [Leave feedback about this document here.](https://github.com/woocommerce/woocommerce-blocks/issues/new?assignees=&labels=type%3A+documentation&template=--doc-feedback.md&title=Feedback%20on%20./docs/third-party-developers/extensibility/rest-api/extend-rest-api-formatters.md) + diff --git a/plugins/woocommerce-blocks/docs/third-party-developers/extensibility/rest-api/extend-rest-api-new-endpoint.md b/plugins/woocommerce-blocks/docs/third-party-developers/extensibility/rest-api/extend-rest-api-new-endpoint.md index 16ed49f5818..b715a1dda9f 100644 --- a/plugins/woocommerce-blocks/docs/third-party-developers/extensibility/rest-api/extend-rest-api-new-endpoint.md +++ b/plugins/woocommerce-blocks/docs/third-party-developers/extensibility/rest-api/extend-rest-api-new-endpoint.md @@ -49,3 +49,4 @@ Extending a new endpoint is usually half the work, you will need to receive this 🐞 Found a mistake, or have a suggestion? [Leave feedback about this document here.](https://github.com/woocommerce/woocommerce-blocks/issues/new?assignees=&labels=type%3A+documentation&template=--doc-feedback.md&title=Feedback%20on%20./docs/third-party-developers/extensibility/rest-api/extend-rest-api-new-endpoint.md) + diff --git a/plugins/woocommerce-blocks/docs/third-party-developers/extensibility/rest-api/extend-rest-api-update-cart.md b/plugins/woocommerce-blocks/docs/third-party-developers/extensibility/rest-api/extend-rest-api-update-cart.md index b62d59cb13b..b2944d6e012 100644 --- a/plugins/woocommerce-blocks/docs/third-party-developers/extensibility/rest-api/extend-rest-api-update-cart.md +++ b/plugins/woocommerce-blocks/docs/third-party-developers/extensibility/rest-api/extend-rest-api-update-cart.md @@ -192,3 +192,4 @@ Now that this is registered, when the button is pressed, the `cart/extensions` e 🐞 Found a mistake, or have a suggestion? [Leave feedback about this document here.](https://github.com/woocommerce/woocommerce-blocks/issues/new?assignees=&labels=type%3A+documentation&template=--doc-feedback.md&title=Feedback%20on%20./docs/third-party-developers/extensibility/rest-api/extend-rest-api-update-cart.md) + diff --git a/plugins/woocommerce-blocks/packages/checkout/README.md b/plugins/woocommerce-blocks/packages/checkout/README.md index 499529bfb46..e2ccb2596af 100644 --- a/plugins/woocommerce-blocks/packages/checkout/README.md +++ b/plugins/woocommerce-blocks/packages/checkout/README.md @@ -62,3 +62,4 @@ This package contains the following directories. Navigate to a directory for mor 🐞 Found a mistake, or have a suggestion? [Leave feedback about this document here.](https://github.com/woocommerce/woocommerce-blocks/issues/new?assignees=&labels=type%3A+documentation&template=--doc-feedback.md&title=Feedback%20on%20./packages/checkout/README.md) + diff --git a/plugins/woocommerce-blocks/packages/checkout/blocks-registry/README.md b/plugins/woocommerce-blocks/packages/checkout/blocks-registry/README.md index 81c6f92da84..e93911ba639 100644 --- a/plugins/woocommerce-blocks/packages/checkout/blocks-registry/README.md +++ b/plugins/woocommerce-blocks/packages/checkout/blocks-registry/README.md @@ -212,3 +212,4 @@ const isValid = hasInnerBlocks( 'woocommerce/checkout-totals-block' ); // true 🐞 Found a mistake, or have a suggestion? [Leave feedback about this document here.](https://github.com/woocommerce/woocommerce-blocks/issues/new?assignees=&labels=type%3A+documentation&template=--doc-feedback.md&title=Feedback%20on%20./packages/checkout/blocks-registry/README.md) + diff --git a/plugins/woocommerce-blocks/packages/checkout/components/README.md b/plugins/woocommerce-blocks/packages/checkout/components/README.md index f66beaf0a03..305ebeb1946 100644 --- a/plugins/woocommerce-blocks/packages/checkout/components/README.md +++ b/plugins/woocommerce-blocks/packages/checkout/components/README.md @@ -29,3 +29,4 @@ These components are here so they can be consumed by extensions. 🐞 Found a mistake, or have a suggestion? [Leave feedback about this document here.](https://github.com/woocommerce/woocommerce-blocks/issues/new?assignees=&labels=type%3A+documentation&template=--doc-feedback.md&title=Feedback%20on%20./packages/checkout/components/README.md) + diff --git a/plugins/woocommerce-blocks/packages/checkout/filter-registry/README.md b/plugins/woocommerce-blocks/packages/checkout/filter-registry/README.md index 7359e271769..1045d9d025f 100644 --- a/plugins/woocommerce-blocks/packages/checkout/filter-registry/README.md +++ b/plugins/woocommerce-blocks/packages/checkout/filter-registry/README.md @@ -132,3 +132,4 @@ Filters are implemented throughout the Mini-Cart, Cart and Checkout Blocks, as w 🐞 Found a mistake, or have a suggestion? [Leave feedback about this document here.](https://github.com/woocommerce/woocommerce-blocks/issues/new?assignees=&labels=type%3A+documentation&template=--doc-feedback.md&title=Feedback%20on%20./packages/checkout/filter-registry/README.md) + diff --git a/plugins/woocommerce-blocks/packages/checkout/slot/README.md b/plugins/woocommerce-blocks/packages/checkout/slot/README.md index df513cb2e39..eeb677b95e0 100644 --- a/plugins/woocommerce-blocks/packages/checkout/slot/README.md +++ b/plugins/woocommerce-blocks/packages/checkout/slot/README.md @@ -192,3 +192,4 @@ Slot Fills are implemented throughout the Cart and Checkout Blocks, as well as s 🐞 Found a mistake, or have a suggestion? [Leave feedback about this document here.](https://github.com/woocommerce/woocommerce-blocks/issues/new?assignees=&labels=type%3A+documentation&template=--doc-feedback.md&title=Feedback%20on%20./packages/checkout/slot/README.md) + diff --git a/plugins/woocommerce-blocks/packages/checkout/utils/README.md b/plugins/woocommerce-blocks/packages/checkout/utils/README.md index d2693b8843b..e4735267082 100644 --- a/plugins/woocommerce-blocks/packages/checkout/utils/README.md +++ b/plugins/woocommerce-blocks/packages/checkout/utils/README.md @@ -81,3 +81,4 @@ What value must contain. If this is not found within `value`, and error will be 🐞 Found a mistake, or have a suggestion? [Leave feedback about this document here.](https://github.com/woocommerce/woocommerce-blocks/issues/new?assignees=&labels=type%3A+documentation&template=--doc-feedback.md&title=Feedback%20on%20./packages/checkout/utils/README.md) + diff --git a/plugins/woocommerce-blocks/src/StoreApi/README.md b/plugins/woocommerce-blocks/src/StoreApi/README.md index 3e1a8196a01..dfde393f7c0 100644 --- a/plugins/woocommerce-blocks/src/StoreApi/README.md +++ b/plugins/woocommerce-blocks/src/StoreApi/README.md @@ -172,3 +172,4 @@ If you're looking to add _new routes and endpoints_, rather than extending the S 🐞 Found a mistake, or have a suggestion? [Leave feedback about this document here.](https://github.com/woocommerce/woocommerce-blocks/issues/new?assignees=&labels=type%3A+documentation&template=--doc-feedback.md&title=Feedback%20on%20./src/StoreApi/README.md) + diff --git a/plugins/woocommerce-blocks/src/StoreApi/docs/cart-coupons.md b/plugins/woocommerce-blocks/src/StoreApi/docs/cart-coupons.md index 0bd3adcd004..e3a2d7d235f 100644 --- a/plugins/woocommerce-blocks/src/StoreApi/docs/cart-coupons.md +++ b/plugins/woocommerce-blocks/src/StoreApi/docs/cart-coupons.md @@ -171,3 +171,4 @@ curl --request DELETE https://example-store.com/wp-json/wc/store/v1/cart/coupons 🐞 Found a mistake, or have a suggestion? [Leave feedback about this document here.](https://github.com/woocommerce/woocommerce-blocks/issues/new?assignees=&labels=type%3A+documentation&template=--doc-feedback.md&title=Feedback%20on%20./src/StoreApi/docs/cart-coupons.md) + diff --git a/plugins/woocommerce-blocks/src/StoreApi/docs/cart-items.md b/plugins/woocommerce-blocks/src/StoreApi/docs/cart-items.md index 9fa735e39b9..c6797f8e56c 100644 --- a/plugins/woocommerce-blocks/src/StoreApi/docs/cart-items.md +++ b/plugins/woocommerce-blocks/src/StoreApi/docs/cart-items.md @@ -369,3 +369,4 @@ curl --request DELETE https://example-store.com/wp-json/wc/store/v1/cart/items 🐞 Found a mistake, or have a suggestion? [Leave feedback about this document here.](https://github.com/woocommerce/woocommerce-blocks/issues/new?assignees=&labels=type%3A+documentation&template=--doc-feedback.md&title=Feedback%20on%20./src/StoreApi/docs/cart-items.md) + diff --git a/plugins/woocommerce-blocks/src/StoreApi/docs/cart.md b/plugins/woocommerce-blocks/src/StoreApi/docs/cart.md index 8d99937ea34..f8241d9840e 100644 --- a/plugins/woocommerce-blocks/src/StoreApi/docs/cart.md +++ b/plugins/woocommerce-blocks/src/StoreApi/docs/cart.md @@ -551,3 +551,4 @@ Returns the full [Cart Response](#cart-response) on success, or an [Error Respon 🐞 Found a mistake, or have a suggestion? [Leave feedback about this document here.](https://github.com/woocommerce/woocommerce-blocks/issues/new?assignees=&labels=type%3A+documentation&template=--doc-feedback.md&title=Feedback%20on%20./src/StoreApi/docs/cart.md) + diff --git a/plugins/woocommerce-blocks/src/StoreApi/docs/checkout.md b/plugins/woocommerce-blocks/src/StoreApi/docs/checkout.md index 13781f951ce..ef09146e411 100644 --- a/plugins/woocommerce-blocks/src/StoreApi/docs/checkout.md +++ b/plugins/woocommerce-blocks/src/StoreApi/docs/checkout.md @@ -227,3 +227,4 @@ For further information on generating a `stripe_source` please check [the Stripe 🐞 Found a mistake, or have a suggestion? [Leave feedback about this document here.](https://github.com/woocommerce/woocommerce-blocks/issues/new?assignees=&labels=type%3A+documentation&template=--doc-feedback.md&title=Feedback%20on%20./src/StoreApi/docs/checkout.md) + diff --git a/plugins/woocommerce-blocks/src/StoreApi/docs/guiding-principles.md b/plugins/woocommerce-blocks/src/StoreApi/docs/guiding-principles.md index a217016f493..0ce28e33ecb 100644 --- a/plugins/woocommerce-blocks/src/StoreApi/docs/guiding-principles.md +++ b/plugins/woocommerce-blocks/src/StoreApi/docs/guiding-principles.md @@ -140,3 +140,4 @@ The version will not increase for bug fixes unless the scope of the bug causes a 🐞 Found a mistake, or have a suggestion? [Leave feedback about this document here.](https://github.com/woocommerce/woocommerce-blocks/issues/new?assignees=&labels=type%3A+documentation&template=--doc-feedback.md&title=Feedback%20on%20./src/StoreApi/docs/guiding-principles.md) + diff --git a/plugins/woocommerce-blocks/src/StoreApi/docs/nonce-tokens.md b/plugins/woocommerce-blocks/src/StoreApi/docs/nonce-tokens.md index 333fdecf180..6d0ee9c8872 100644 --- a/plugins/woocommerce-blocks/src/StoreApi/docs/nonce-tokens.md +++ b/plugins/woocommerce-blocks/src/StoreApi/docs/nonce-tokens.md @@ -56,3 +56,4 @@ NOTE: This should only be done on development sites where security is not import 🐞 Found a mistake, or have a suggestion? [Leave feedback about this document here.](https://github.com/woocommerce/woocommerce-blocks/issues/new?assignees=&labels=type%3A+documentation&template=--doc-feedback.md&title=Feedback%20on%20./src/StoreApi/docs/nonce-tokens.md) + diff --git a/plugins/woocommerce-blocks/src/StoreApi/docs/product-attribute-terms.md b/plugins/woocommerce-blocks/src/StoreApi/docs/product-attribute-terms.md index 2bae3b89e96..efb4c05552e 100644 --- a/plugins/woocommerce-blocks/src/StoreApi/docs/product-attribute-terms.md +++ b/plugins/woocommerce-blocks/src/StoreApi/docs/product-attribute-terms.md @@ -43,3 +43,4 @@ curl "https://example-store.com/wp-json/wc/store/v1/products/attributes/1/terms" 🐞 Found a mistake, or have a suggestion? [Leave feedback about this document here.](https://github.com/woocommerce/woocommerce-blocks/issues/new?assignees=&labels=type%3A+documentation&template=--doc-feedback.md&title=Feedback%20on%20./src/StoreApi/docs/product-attribute-terms.md) + diff --git a/plugins/woocommerce-blocks/src/StoreApi/docs/product-attributes.md b/plugins/woocommerce-blocks/src/StoreApi/docs/product-attributes.md index 31f3fc9596e..da6b25f629f 100644 --- a/plugins/woocommerce-blocks/src/StoreApi/docs/product-attributes.md +++ b/plugins/woocommerce-blocks/src/StoreApi/docs/product-attributes.md @@ -78,3 +78,4 @@ curl "https://example-store.com/wp-json/wc/store/v1/products/attributes/1" 🐞 Found a mistake, or have a suggestion? [Leave feedback about this document here.](https://github.com/woocommerce/woocommerce-blocks/issues/new?assignees=&labels=type%3A+documentation&template=--doc-feedback.md&title=Feedback%20on%20./src/StoreApi/docs/product-attributes.md) + diff --git a/plugins/woocommerce-blocks/src/StoreApi/docs/product-categories.md b/plugins/woocommerce-blocks/src/StoreApi/docs/product-categories.md index 3c992d1e0c6..ed1e8cb2f89 100644 --- a/plugins/woocommerce-blocks/src/StoreApi/docs/product-categories.md +++ b/plugins/woocommerce-blocks/src/StoreApi/docs/product-categories.md @@ -95,3 +95,4 @@ curl "https://example-store.com/wp-json/wc/store/v1/products/categories/1" 🐞 Found a mistake, or have a suggestion? [Leave feedback about this document here.](https://github.com/woocommerce/woocommerce-blocks/issues/new?assignees=&labels=type%3A+documentation&template=--doc-feedback.md&title=Feedback%20on%20./src/StoreApi/docs/product-categories.md) + diff --git a/plugins/woocommerce-blocks/src/StoreApi/docs/product-collection-data.md b/plugins/woocommerce-blocks/src/StoreApi/docs/product-collection-data.md index 21ca1821edc..510c2856a60 100644 --- a/plugins/woocommerce-blocks/src/StoreApi/docs/product-collection-data.md +++ b/plugins/woocommerce-blocks/src/StoreApi/docs/product-collection-data.md @@ -73,3 +73,4 @@ curl "https://example-store.com/wp-json/wc/store/v1/products/collection-data?cal 🐞 Found a mistake, or have a suggestion? [Leave feedback about this document here.](https://github.com/woocommerce/woocommerce-blocks/issues/new?assignees=&labels=type%3A+documentation&template=--doc-feedback.md&title=Feedback%20on%20./src/StoreApi/docs/product-collection-data.md) + diff --git a/plugins/woocommerce-blocks/src/StoreApi/docs/product-reviews.md b/plugins/woocommerce-blocks/src/StoreApi/docs/product-reviews.md index 4f63ecd2fba..0aab4643599 100644 --- a/plugins/woocommerce-blocks/src/StoreApi/docs/product-reviews.md +++ b/plugins/woocommerce-blocks/src/StoreApi/docs/product-reviews.md @@ -72,3 +72,4 @@ curl "https://example-store.com/wp-json/wc/store/v1/products/collection-data?cal 🐞 Found a mistake, or have a suggestion? [Leave feedback about this document here.](https://github.com/woocommerce/woocommerce-blocks/issues/new?assignees=&labels=type%3A+documentation&template=--doc-feedback.md&title=Feedback%20on%20./src/StoreApi/docs/product-reviews.md) + diff --git a/plugins/woocommerce-blocks/src/StoreApi/docs/product-tags.md b/plugins/woocommerce-blocks/src/StoreApi/docs/product-tags.md index 58875977d0c..549e3ea1b24 100644 --- a/plugins/woocommerce-blocks/src/StoreApi/docs/product-tags.md +++ b/plugins/woocommerce-blocks/src/StoreApi/docs/product-tags.md @@ -48,3 +48,4 @@ Example response: 🐞 Found a mistake, or have a suggestion? [Leave feedback about this document here.](https://github.com/woocommerce/woocommerce-blocks/issues/new?assignees=&labels=type%3A+documentation&template=--doc-feedback.md&title=Feedback%20on%20./src/StoreApi/docs/product-tags.md) + diff --git a/plugins/woocommerce-blocks/src/StoreApi/docs/products.md b/plugins/woocommerce-blocks/src/StoreApi/docs/products.md index 62f381005a3..7b1499923db 100644 --- a/plugins/woocommerce-blocks/src/StoreApi/docs/products.md +++ b/plugins/woocommerce-blocks/src/StoreApi/docs/products.md @@ -279,3 +279,4 @@ curl "https://example-store.com/wp-json/wc/store/v1/products?type=variation" 🐞 Found a mistake, or have a suggestion? [Leave feedback about this document here.](https://github.com/woocommerce/woocommerce-blocks/issues/new?assignees=&labels=type%3A+documentation&template=--doc-feedback.md&title=Feedback%20on%20./src/StoreApi/docs/products.md) + diff --git a/plugins/woocommerce-blocks/src/StoreApi/docs/rate-limiting.md b/plugins/woocommerce-blocks/src/StoreApi/docs/rate-limiting.md index b4007381f5e..6dfc50229b8 100644 --- a/plugins/woocommerce-blocks/src/StoreApi/docs/rate-limiting.md +++ b/plugins/woocommerce-blocks/src/StoreApi/docs/rate-limiting.md @@ -84,13 +84,6 @@ add_action( ); ``` ---- - -[We're hiring!](https://woocommerce.com/careers/) Come work with us! - -🐞 Found a mistake, or have a suggestion? [Leave feedback about this document here.](https://github.com/woocommerce/woocommerce-gutenberg-products-block/issues/new?assignees=&labels=type%3A+documentation&template=--doc-feedback.md&title=Feedback%20on%20./src/StoreApi/docs/rate-limiting.md) - - --- @@ -100,3 +93,4 @@ add_action( 🐞 Found a mistake, or have a suggestion? [Leave feedback about this document here.](https://github.com/woocommerce/woocommerce-blocks/issues/new?assignees=&labels=type%3A+documentation&template=--doc-feedback.md&title=Feedback%20on%20./src/StoreApi/docs/rate-limiting.md) +