28659ee653
* Mock getCartTotals * Change test to use data store instead of context * Move payment method context test to data store selectors * Change description of test suite * Bump commit to trigger tests * Fix path in test * update package lock * Set correct state payment method reducer tests/use correct actions * Get saved payment methods from store not context * Mock stores and update tests to allow switching payment methods * Update tests to get onSubmit from checkoutEventsContext * Remove cartTotalsLoaded check from payment method initialize check * Make PaymentMethods test wait until payments initialized * initialize payment method data store when cart is loaded * Remove unneeded actions and add initializePaymentMethodDataStore * Remove check for cart totals loaded in checkPaymentMethods * Remove updateAvilablePaymentMethods from registry * Remove unneeded mock * Remove unused import * Rename imports to fix eslint errors * Remove unused imports * Remove return false from checkPaymentMethods * Remove unnecessary setPaymentMethodsInitialized call * Add todo comment to track refactoring opportunity * Remove savedpayment methods from payment method context and rename it * Rename payment method data context to payment method events context * Add tests for setDefaultPaymentMethods * Optimize the availablePaymentMethods state data Store only the "name" attribute for now. * Get list of payment methods from the registry instead of the store We are using this hook to get some React elements in the payment method object. So, we are getting the raw data directly from the registry instead of the store. * Fix payment state not loading on the Checkout edit page * Handle checkout edit page case * Fix infinite loop error on C&C Blocks * Include @wordpress/redux-routine in transformIgnorePatterns jest config Co-authored-by: Saad Tarhi <saad.trh@gmail.com> |
||
---|---|---|
.. | ||
contributors | ||
designers/theming | ||
examples | ||
internal-developers | ||
third-party-developers/extensibility | ||
README.md |
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.
- Blocks
- Block Data
- Block Client APIs
- Editor Components
- Icons
- Legacy Build
- Store API (REST API)
- Storybook
- Templates
- Testing
- Translations
Third-party developers
Are you a third-party developer? The following documents explain how to extend the WooCommerce Blocks plugin with your custom extension.
- Extensibility
- Hooks
- REST API
- Checkout Payment Methods
- Checkout Blocks
Designers
Are you a designer? The following documents explain how to apply design-changes to the WooCommerce Blocks plugin.
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.
- How to integrate with inner blocks in the WooCommerce Blocks Checkout A repository with some example code showing how an extension can register an inner block for use in the Checkout Block.
Articles
The following posts from developer.woocommerce.com provide deeper insights into the WooCommerce Blocks development.
- Store API is now considered stable
- Available Extensibility Interfaces for The Cart and Checkout Blocks
Tutorials
The following tutorials from developer.woocommerce.com help you with extending the WooCommerce Blocks plugin.
- Hiding Shipping and Payment Options in the Cart and Checkout Blocks
- Integrating your Payment Method with Cart and Checkout Blocks
- Exposing Payment Options in the Checkout Block
We're hiring! Come work with us!
🐞 Found a mistake, or have a suggestion? Leave feedback about this document here.