woocommerce/plugins/woocommerce-blocks/docs/third-party-developers/extensibility
Saad Tarhi 8f99863a2e Create add to custom fields documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11787)
* Create add to custom fields documentation

* Update the checkout custom field docs

* Add back end steps and examples

* Make it clear that we are building a field block

* Update docs/third-party-developers/extensibility/rest-api/extend-rest-api-add-custom-fields.md

Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

* Update docs/third-party-developers/extensibility/rest-api/extend-rest-api-add-custom-fields.md

Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

* Update docs/third-party-developers/extensibility/rest-api/extend-rest-api-add-custom-fields.md

Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

* Update docs/third-party-developers/extensibility/rest-api/extend-rest-api-add-custom-fields.md

Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>

* Mention that the block will not render if parent isn't required

* Add more details about `seExtensionData`

* Add additional code examples for the backend

* Avoid extending store API inside an IntegrationInterface

* Add code example that invokes the extend store endpoint class

---------

Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
2023-12-01 15:16:46 +01:00
..
checkout-block fixed multiple typos inside docs (https://github.com/woocommerce/woocommerce-blocks/pull/11426) 2023-11-14 13:10:47 +13:00
checkout-payment-methods onPaymentProcessing->onPaymentSetup (https://github.com/woocommerce/woocommerce-blocks/pull/11578) 2023-11-09 11:47:49 +00:00
data-store Adds a state example for the payment data store (https://github.com/woocommerce/woocommerce-blocks/pull/11770) 2023-11-15 11:19:39 +00:00
hooks Add an example of woocommerce_store_api_add_to_cart_data (https://github.com/woocommerce/woocommerce-blocks/pull/11837) 2023-11-21 12:58:42 +00:00
rest-api Create add to custom fields documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11787) 2023-12-01 15:16:46 +01:00
README.md Update extensibility doc (https://github.com/woocommerce/woocommerce-blocks/pull/11924) 2023-11-27 18:25:51 +01:00

README.md

Extensibility in WooCommerce Blocks

Table of Contents

These documents are all dealing with extensibility in the various WooCommerce Blocks.

Imports and dependency extration

The documentation in this section will use window globals in code examples, for example:

const { registerCheckoutFilters } = window.wc.blocksCheckout;

However, if you're using @woocommerce/dependency-extraction-webpack-plugin for enhanced dependency management you can instead use ES module syntax:

import { registerCheckoutFilters } from '@woocommerce/blocks-checkout';

See https://www.npmjs.com/package/@woocommerce/dependency-extraction-webpack-plugin for more information.

Hooks (actions and filters)

Document Description
Actions Documentation covering action hooks on the server side.
Filters Documentation covering filter hooks on the server side.
Migrated Hooks Documentation covering the migrated WooCommerce core hooks.

REST API

Document Description
Exposing your data in the Store API. Explains how you can add additional data to Store API endpoints.
Available endpoints to extend with ExtendSchema A list of all available endpoints to extend.
Available Formatters Available Formatters to format data for use in the Store API.
Updating the cart with the Store API Update the server-side cart following an action from the front-end.

Checkout Payment Methods

Document Description
Checkout Flow and Events All about the checkout flow in the checkout block and the various emitted events that can be subscribed to.
Payment Method Integration Information about implementing payment methods.
Filtering Payment Methods Information about filtering the payment methods available in the Checkout Block.

Checkout Block

In addition to the reference material below, please see the block-checkout package documentation which is used to extend checkout with Filters, Slot Fills, and Inner Blocks.

Document Description
How the Checkout Block processes an order The detailed inner workings of the Checkout Flow.
IntegrationInterface The IntegrationInterface class and how to use it to register scripts, styles, and data with WooCommerce Blocks.
Available Filters All about the filters that you may use to change values of certain elements of WooCommerce Blocks.
Slots and Fills Explains Slot Fills and how to use them to render your own components in Cart and Checkout.
Available Slot Fills Available Slots that you can use and their positions in Cart and Checkout.
DOM Events A list of DOM Events used by some blocks to communicate between them and with other parts of WooCommerce.
Filter Registry The filter registry allows callbacks to be registered to manipulate certain values.

We're hiring! Come work with us!

🐞 Found a mistake, or have a suggestion? Leave feedback about this document here.