woocommerce/plugins/woocommerce-blocks/docs
Thomas Roberts 4861ec250e
Ensure local state is not overwritten by server when using `extensionCartUpdate` (#49311)
* Update ExtensionCartUpdateArgs to allow overwriting dirty data

* Set isCustomerDataDirty when updating billing/shipping addresses

* Update docs

* Add e2e test to ensure overwriting dirty state isn't possible

* Organise tests better and add check pushed data isn't overwritten

* Check if data is changing when updating shipping/billing addresses

* Check input values in test

* Add test to ensure data can still be overwritten by extensions

* Add changelog

* Fix lint errors

* Remove rogue console log

* Remove unused import

* Update plugins/woocommerce-blocks/assets/js/data/cart/reducers.ts

* Fix lint error

* Remove unneeded mdlint ignore

* Update test to select a value instead of fill

* Add methods to get/set dirty customer data in local storage

* Push all customer data, not just dirty fields

* Update e2e test

* Update push changes unit test

* Update keys in mock expected arg

* Align localstorage key name with Gutenberg uppercase style

* Fix lost code after merge conflict

* Remove unnecessary metadata set in reducer

* Reimplement TS changes

* Debounce writing to localStorage

* Only update localStorage if billing/shipping changed

* Remove localStorage key when checkout is complete

* Remove unused import
2024-11-07 18:18:57 +01:00
..
.media/images Blocks E2E: Streamline E2E utils implementation (#47660) 2024-05-27 14:54:06 +00:00
contributors Update broken docs links (#51967) 2024-10-10 17:37:27 +01:00
designers/theming Update broken docs links (#51967) 2024-10-10 17:37:27 +01:00
examples Format Markdown files using wp-scripts (https://github.com/woocommerce/woocommerce-blocks/pull/6462) 2022-06-09 14:43:17 +02:00
internal-developers Update broken docs links (#51967) 2024-10-10 17:37:27 +01:00
third-party-developers/extensibility Ensure local state is not overwritten by server when using `extensionCartUpdate` (#49311) 2024-11-07 18:18:57 +01:00
README.md Fix block theming doc links (#52230) 2024-10-24 12:19:59 +02:00

README.md

WooCommerce Blocks Handbook

Table of Contents

The WooCommerce Blocks Handbook provides documentation for designers and developers on how to extend or contribute to blocks, and how internal developers should handle new releases.

Contributors

Want to contribute to the WooCommerce Blocks plugin? The following documents offer information that can help you get started.

Internal developers

Are you an internal developer? The following documents offer information about the different blocks, the Block Client APIs, the Store API, the templates and the testing process.

Third-party developers

Are you a third-party developer? The following documents explain how to extend the WooCommerce Blocks plugin with your custom extension.

Designers and theme developers

The following document explains how to to create block themes that work in WooCommerce and how to customize the styles of WooCommerce blocks.

Block References

Developer Resources

Tools

  • @woocommerce/extend-cart-checkout-block This is a template to be used with @wordpress/create-block to create a WooCommerce Blocks extension starting point. It also showcases how to use some extensibility points, e.g. registering an inner block in the Checkout Block, applying filters to certain texts such as the place order button, using Slot/Fill and how to change the behaviour of the Store API.

Articles

The following posts from developer.woo.com provide deeper insights into the WooCommerce Blocks development.

Tutorials

The following tutorials from developer.woo.com help you with extending the WooCommerce Blocks plugin.


We're hiring! Come work with us!

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