woocommerce/plugins/woocommerce-blocks/packages/checkout
Seghir Nadir 77a17e48b7
update Mongolia postcode to be 5 digits instead of 6 in Checkout block (#50279)
* update Mongolia postcode to be 5 digits instead of 6

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* update validation package and expand mongolia checks

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* update lock

* fix lock again

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-09-16 11:22:38 +02:00
..
blocks-registry Refactor the Order Summary of the Cart & Checkout blocks (#46386) 2024-04-17 10:28:30 +01:00
components [Performance]: Replace `classnames` usage with `clsx` (#47760) 2024-05-31 05:49:36 +02:00
filter-registry Update blocks JS tests to React 18 (#47383) 2024-05-15 21:33:36 +12:00
slot Update cart/checkout usage of the @wordpress/components Slot Fill (#47105) 2024-05-16 21:46:24 +12:00
utils update Mongolia postcode to be 5 digits instead of 6 in Checkout block (#50279) 2024-09-16 11:22:38 +02:00
README.md Update Woo.com references to WooCommerce.com (#46259) 2024-04-09 09:50:15 +01:00
index.js Update cart/checkout usage of the @wordpress/components Slot Fill (#47105) 2024-05-16 21:46:24 +12:00
style.scss Create @woocommerce/checkout to export components to a global (https://github.com/woocommerce/woocommerce-blocks/pull/3654) 2021-01-07 13:02:21 +01:00

README.md

Checkout

Table of Contents

Components and utilities making it possible to integrate with the WooCommerce Mini-Cart, Cart and Checkout Blocks.

Installation

This package is available as an external when the WooCommerce Blocks Feature Plugin is installed and activated.

Usage

Package components can be accessed via the wc global:

const { ... } = wc.blocksCheckout;

Aliased imports

Alternatively, you can map this to externals (or aliases) using the WooCommerce Dependency Extraction Webpack Plugin. Just add the above Webpack plugin to your package.json:

npm install @woocommerce/dependency-extraction-webpack-plugin --save-dev

Now, you can include this plugin in your Webpack configuration:

// webpack.config.js
const WooCommerceDependencyExtractionWebpackPlugin = require( '@woocommerce/dependency-extraction-webpack-plugin' );

module.exports = {
	// …snip
	plugins: [ new WooCommerceDependencyExtractionWebpackPlugin() ],
};

Folder Structure Overview

This package contains the following directories. Navigate to a directory for more in depth documentation about each module.

Directory Contents
blocks-registry/ Used to register new Inner Blocks that can be inserted either automatically or optionally within the Checkout Block. Example use case: Creating a newsletter subscription block on the Checkout.
components/ Components available for use by Checkout Blocks.
filter-registry/ Used to manipulate content where filters are available. Example use case: Changing how prices are displayed. (Documentation)
slot/ Slot and Fill are a pair of components which enable developers to render in a React element tree. In this context, they are used to insert content within Blocks where slot fills are available. Example use case: Adding a custom component after the shipping options. (Documentation)
utils/ Miscellaneous utility functions for dealing with checkout functionality.

We're hiring! Come work with us!

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