woocommerce/plugins/woocommerce-blocks/packages/checkout
Alex Florisca d9bf1ba94c Convert components to Typescript (https://github.com/woocommerce/woocommerce-blocks/pull/5241)
* Convert ReturnToCartButton component to TS

* Convert FormStep component to TS

* Remoe proptypes from FormStep and AddressFormn components

* Converted order-summary component to TS

* Convert product-price component to TS

* alias path to type-defs

* Fix errors

* Changes from Thomas feedback

* Change minPrice maxPrice logic to be more robust

* Changed types from inline to interface in ReturnToCartButton component

* Check for string type in order-summary-item

* add missing isString check
2021-11-26 17:03:12 +00:00
..
blocks-registry Migrate Cart i1 to Cart i2 (https://github.com/woocommerce/woocommerce-blocks/pull/4973) 2021-10-25 15:46:34 +01:00
components Checkbox Control: Fix squished checkboxes when label text wraps (https://github.com/woocommerce/woocommerce-blocks/pull/5192) (https://github.com/woocommerce/woocommerce-blocks/pull/5206) 2021-11-25 15:31:47 +01:00
filter-registry Add Checkout Package and Checkout i2 Documentation (https://github.com/woocommerce/woocommerce-blocks/pull/4892) 2021-10-12 15:23:52 +01:00
slot Update README.md 2021-10-29 15:12:11 +01:00
utils Convert components to Typescript (https://github.com/woocommerce/woocommerce-blocks/pull/5241) 2021-11-26 17:03:12 +00:00
README.md In `@woocommerce/blocks-checkout` package documentation - reference WCDEWP instead of WPDEWP (https://github.com/woocommerce/woocommerce-blocks/pull/5154) 2021-11-20 07:08:58 -05:00
index.js Add Checkout Package and Checkout i2 Documentation (https://github.com/woocommerce/woocommerce-blocks/pull/4892) 2021-10-12 15:23:52 +01: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

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

Table of Contents

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.



WooCommerce
We're hiring! Come work with us!