woocommerce/plugins/woocommerce-blocks/docs/third-party-developers/extensibility/data-store/cart.md

978 lines
33 KiB
Markdown
Raw Normal View History

Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
# Cart Store (`wc/store/cart`) <!-- omit in toc -->
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
> 💡 What's the difference between the Cart Store and the Checkout Store?
>
> The **Cart Store (`wc/store/cart`)** manages and retrieves data about the shopping cart, including items, customer data, and interactions like coupons.
>
> The **Checkout Store (`wc/store/checkout`)** manages and retrieves data related to the checkout process, customer IDs, order IDs, and checkout status.
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
## Table of Contents <!-- omit in toc -->
- [Overview](#overview)
- [Usage](#usage)
- [Actions](#actions)
- [setCartData](#setcartdata)
- [setErrorData](#seterrordata)
- [receiveCartContents](#receivecartcontents)
- [receiveApplyingCoupon](#receiveapplyingcoupon)
- [receiveRemovingCoupon](#receiveremovingcoupon)
- [receiveCartItem](#receivecartitem)
- [itemIsPendingQuantity](#itemispendingquantity)
- [itemIsPendingDelete](#itemispendingdelete)
- [setIsCartDataStale](#setiscartdatastale)
- [updatingCustomerData](#updatingcustomerdata)
- [shippingRatesBeingSelected](#shippingratesbeingselected)
- [applyExtensionCartUpdate](#applyextensioncartupdate)
- [applyCoupon](#applycoupon)
- [removeCoupon](#removecoupon)
- [addItemToCart](#additemtocart)
- [removeItemFromCart](#removeitemfromcart)
- [changeCartItemQuantity](#changecartitemquantity)
- [selectShippingRate](#selectshippingrate)
- [setBillingAddress](#setbillingaddress)
- [setShippingAddress](#setshippingaddress)
- [updateCustomerData](#updatecustomerdata)
- [Selectors](#selectors)
- [getCartData](#getcartdata)
- [getCustomerData](#getcustomerdata)
- [getShippingRates](#getshippingrates)
- [getNeedsShipping](#getneedsshipping)
- [getHasCalculatedShipping](#gethascalculatedshipping)
- [getCartTotals](#getcarttotals)
- [getCartMeta](#getcartmeta)
- [getCartErrors](#getcarterrors)
- [isApplyingCoupon](#isapplyingcoupon)
- [isCartDataStale](#iscartdatastale)
- [getCouponBeingApplied](#getcouponbeingapplied)
- [isRemovingCoupon](#isremovingcoupon)
- [getCouponBeingRemoved](#getcouponbeingremoved)
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
- [getCartItem( cartItemKey )](#getcartitem-cartitemkey-)
- [isItemPendingQuantity( cartItemKey )](#isitempendingquantity-cartitemkey-)
- [isItemPendingDelete( cartItemKey )](#isitempendingdelete-cartitemkey-)
- [isCustomerDataUpdating](#iscustomerdataupdating)
- [isShippingRateBeingSelected](#isshippingratebeingselected)
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
- [getItemsPendingQuantityUpdate](#getitemspendingquantityupdate)
- [getItemsPendingDelete](#getitemspendingdelete)
## Overview
The Cart Store provides a collection of selectors and methods to manage and retrieve cart-related data for WooCommerce Blocks. It offers functionality ranging from fetching cart details to managing customer interactions, such as applying coupons or updating shipping information.
## Usage
To utilize this store you will import the `CART_STORE_KEY` in any module referencing it. Assuming `@woocommerce/block-data` is registered as an external pointing to `wc.wcBlocksData` you can import the key via:
```js
const { CART_STORE_KEY } = window.wc.wcBlocksData;
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
```
## Actions
### setCartData
This action is used to set the cart data in the store.
#### _Parameters_ <!-- omit in toc -->
- _cartData_ `object`: The current cart data with the following keys:
- _coupons_ `array`: The coupon items in the cart.
- _shippingRates_ `array`: The cart shipping rates (see `getShippingRates` selector).
- _shippingAddress_ `object`: The shipping address (see `getCustomerData` selector).
- _billingAddress_ `object`: The billing address (see `getCustomerData` selector).
- _items_ `array`: The cart items.
- _itemsCount_ `number`: The total number of items in the cart
- _itemsWeight_ `number`: The total weight of items in the cart.
- _crossSells_ `array`: The cross sells items.
- _needsPayment_ `boolean`: If the cart needs payment.
- _needsShipping_ `boolean`: If the cart needs shipping.
- _hasCalculatedShipping_ `boolean`: If the cart has calculated shipping.
- _fees_ `array`: The cart fees.
- _totals_ `object`: The cart totals (see `getCartTotals` selector).
- _errors_ `array`: The cart errors (see `getCartErrors` selector).
- _paymentRequirements_ `object`: The payment requirements for the cart.
- _extensions_ `object`: The extensions data.
#### _Example_ <!-- omit in toc -->
```js
const { dispatch } = useDispatch( CART_STORE_KEY );
dispatch( setCartData( newCartData ) );
```
### setErrorData
This action is used to set the error data in the store.
#### _Parameters_ <!-- omit in toc -->
- _errorData_ `object`: The error data that needs to be set in the store.
- _code_ `string`: The error code.
- _message_ `string`: The error message.
- _data_ `object`: Additional error data. This is an optional object with the following keys:
- _status_ `number`: The error status.
- _params_ `string`: The error params.
- _message_ `string`: The error message.
- _cart_ `object`: The cart data. This is an optional object with the following keys:
- _coupons_ `array`: The coupon items in the cart.
- _shippingRates_ `array`: The cart shipping rates (see `getShippingRates` selector).
- _shippingAddress_ `object`: The shipping address (see `getCustomerData` selector).
- _billingAddress_ `object`: The billing address (see `getCustomerData` selector).
- _items_ `array`: The cart items.
- _itemsCount_ `number`: The total number of items in the cart
- _itemsWeight_ `number`: The total weight of items in the cart.
- _crossSells_ `array`: The cross sells items.
- _needsPayment_ `boolean`: If the cart needs payment.
- _needsShipping_ `boolean`: If the cart needs shipping.
- _hasCalculatedShipping_ `boolean`: If the cart has calculated shipping.
- _fees_ `array`: The cart fees.
- _totals_ `object`: The cart totals (see `getCartTotals` selector).
- _errors_ `array`: The cart errors (see `getCartErrors` selector).
- _paymentRequirements_ `object`: The payment requirements for the cart.
- _extensions_ `object`: The extensions data.
#### _Example_ <!-- omit in toc -->
```js
const { dispatch } = useDispatch( CART_STORE_KEY );
dispatch( setErrorData( newErrorData ) );
```
### receiveCartContents
This action returns an action object used in updating the store with the provided cart. It omits the customer addresses so that only updates to cart items and totals are received.
#### _Parameters_ <!-- omit in toc -->
- _cartContents_ `object`: A cart contents API response.
- _coupons_ `array`: The coupon items in the cart.
- _shippingRates_ `array`: The cart shipping rates (see `getShippingRates` selector).
- _shippingAddress_ `object`: The shipping address (see `getCustomerData` selector).
- _billingAddress_ `object`: The billing address (see `getCustomerData` selector).
- _items_ `array`: The cart items.
- _itemsCount_ `number`: The total number of items in the cart
- _itemsWeight_ `number`: The total weight of items in the cart.
- _crossSells_ `array`: The cross sells items.
- _needsPayment_ `boolean`: If the cart needs payment.
- _needsShipping_ `boolean`: If the cart needs shipping.
- _hasCalculatedShipping_ `boolean`: If the cart has calculated shipping.
- _fees_ `array`: The cart fees.
- _totals_ `object`: The cart totals (see `getCartTotals` selector).
- _errors_ `array`: The cart errors (see `getCartErrors` selector).
- _paymentRequirements_ `object`: The payment requirements for the cart.
- _extensions_ `object`: The extensions data.
#### _Returns_ <!-- omit in toc -->
- `object`: The action object with the following keys:
- _type_ `string`: The action type.
- _cartContents_ `object`: The cart contents with the following keys:
- _coupons_ `array`: The coupon items in the cart.
- _shippingRates_ `array`: The cart shipping rates (see `getShippingRates` selector).
- _items_ `array`: The cart items.
- _itemsCount_ `number`: The total number of items in the cart
- _itemsWeight_ `number`: The total weight of items in the cart.
- _crossSells_ `array`: The cross sells items.
- _needsPayment_ `boolean`: If the cart needs payment.
- _needsShipping_ `boolean`: If the cart needs shipping.
- _hasCalculatedShipping_ `boolean`: If the cart has calculated shipping.
- _fees_ `array`: The cart fees.
- _totals_ `object`: The cart totals (see `getCartTotals` selector).
- _errors_ `array`: The cart errors (see `getCartErrors` selector).
- _paymentRequirements_ `object`: The payment requirements for the cart.
- _extensions_ `object`: The extensions data.
#### _Example_ <!-- omit in toc -->
```js
const { dispatch } = useDispatch( CART_STORE_KEY );
dispatch( receiveCartContents( newCartContents ) );
```
### receiveApplyingCoupon
This action returns an action object used to track when a coupon is applying.
#### _Parameters_ <!-- omit in toc -->
- _couponCode_ `string`: The code of the coupon being applied.
#### _Returns_ <!-- omit in toc -->
- `object`: The action object with following keys:
- _type_ `string`: The action type.
- _couponCode_ `string`: The code of the coupon being applied.
#### _Example_ <!-- omit in toc -->
```js
const { dispatch } = useDispatch( CART_STORE_KEY );
dispatch( receiveApplyingCoupon( couponCode ) );
```
### receiveRemovingCoupon
This action returns an action object used to track when a coupon is removing.
#### _Parameters_ <!-- omit in toc -->
- _couponCode_ `string`: The code of the coupon being removed.
#### _Returns_ <!-- omit in toc -->
- `object`: The action object with the following keys:
- _type_ `string`: The action type.
- _couponCode_ `string`: The code of the coupon being removed.
#### _Example_ <!-- omit in toc -->
```js
const { dispatch } = useDispatch( CART_STORE_KEY );
dispatch( receiveRemovingCoupon( couponCode ) );
```
### receiveCartItem
This action is used to update a specific item in the cart.
#### _Parameters_ <!-- omit in toc -->
- _cartResponseItem_ `object`: Cart response object with the following keys:
- _cartItem_ `object`: The cart item (see `getCartItem` selector).
#### _Returns_ <!-- omit in toc -->
- `object`: The action object with the following keys:
- _type_ `string`: The action type.
- _cartItem_ `object`: The cart item (see `getCartItem` selector).
#### _Example_ <!-- omit in toc -->
```js
const { dispatch } = useDispatch( CART_STORE_KEY );
dispatch( receiveCartItem( CartResponseItem ) );
```
### itemIsPendingQuantity
This action returns an action object to indicate if the specified cart item quantity is being updated.
#### _Parameters_ <!-- omit in toc -->
- _cartItemKey_ `string`: The key of the cart item.
- _isPending_ `boolean` (default: `true`): Whether the cart item quantity is being updated.
#### _Returns_ <!-- omit in toc -->
- `object`: The action object with following keys:
- _type_ `string`: The action type.
- _cartItemKey_ `string`: The key of the cart item.
- _isPending_ `boolean`: Whether the cart item quantity is being updated.
#### _Example_ <!-- omit in toc -->
```js
const { dispatch } = useDispatch( CART_STORE_KEY );
dispatch( itemIsPendingQuantity( cartItemKey, isPending ) );
```
### itemIsPendingDelete
This action returns an action object to indicate if the specified cart item is being deleted.
#### _Parameters_ <!-- omit in toc -->
- _cartItemKey_ `string`: The key of the cart item.
- _isPending_ `boolean` (default: `true`): Whether the cart item is being deleted.
#### _Returns_ <!-- omit in toc -->
- `object`: The action object with the following keys:
- _type_ `string`: The action type.
- _cartItemKey_ `string`: The key of the cart item.
- _isPending_ `boolean`: Whether the cart item is being deleted.
#### _Example_ <!-- omit in toc -->
```js
const { dispatch } = useDispatch( CART_STORE_KEY );
dispatch( itemIsPendingDelete( cartItemKey, isPending ) );
```
### setIsCartDataStale
This action returns an action object to indicate if the cart data is stale.
#### _Parameters_ <!-- omit in toc -->
- _isCartDataStale_ `boolean` (default: `true`): Flag to mark cart data as stale; true if `lastCartUpdate` timestamp is newer than the one in wcSettings.
#### _Returns_ <!-- omit in toc -->
- `object`: The action object with the following keys:
- _type_ `string`: The action type.
- _isCartDataStale_ `boolean`: Flag to mark cart data as stale; true if `lastCartUpdate` timestamp is newer than the one in wcSettings.
#### _Example_ <!-- omit in toc -->
```js
const { dispatch } = useDispatch( CART_STORE_KEY );
dispatch( setIsCartDataStale( isCartDataStale ) );
```
### updatingCustomerData
This action returns an action object to indicate if the customer data is being updated.
#### _Parameters_ <!-- omit in toc -->
- _isResolving_ `boolean`: Whether the customer data is being updated.
#### _Returns_ <!-- omit in toc -->
- `object`: The action object with the following keys:
- _type_ `string`: The action type.
- _isResolving_ `boolean`: Whether the customer data is being updated.
#### _Example_ <!-- omit in toc -->
```js
const { dispatch } = useDispatch( CART_STORE_KEY );
dispatch( updatingCustomerData( isResolving ) );
```
### shippingRatesBeingSelected
This action returns an action object to indicate if the shipping rates are being selected.
#### _Parameters_ <!-- omit in toc -->
- _isResolving_ `boolean`: True if shipping rate is being selected.
#### _Returns_ <!-- omit in toc -->
- `object`: The action object with the following keys:
- _type_ `string`: The action type.
- _isResolving_ `boolean`: True if shipping rate is being selected.
#### _Example_ <!-- omit in toc -->
```js
const { dispatch } = useDispatch( CART_STORE_KEY );
dispatch( shippingRatesBeingSelected( isResolving ) );
```
### applyExtensionCartUpdate
This action is used to send POSTs request to the /cart/extensions endpoint with the data supplied by the extension.
#### _Parameters_ <!-- omit in toc -->
- _args_ `object`: The arguments for the request with the following keys:
- _extensionId_ `string`: The extension ID.
- _data_ `object`: The data to send to the endpoint with the following keys:
- _key_ `string`: The key of the extension.
- _value_ `string`: The value of the extension.
#### _Example_ <!-- omit in toc -->
```js
const { dispatch } = useDispatch( CART_STORE_KEY );
dispatch( applyExtensionCartUpdate( args ) );
```
### applyCoupon
This action is used to apply a coupon to the cart.
#### _Parameters_ <!-- omit in toc -->
- _couponCode_ `string`: The code of the coupon to apply.
#### _Example_ <!-- omit in toc -->
```js
const { dispatch } = useDispatch( CART_STORE_KEY );
dispatch( applyCoupon( couponCode ) );
```
### removeCoupon
This action is used to remove a coupon from the cart.
#### _Parameters_ <!-- omit in toc -->
- _couponCode_ `string`: The code of the coupon to remove.
#### _Example_ <!-- omit in toc -->
```js
const { dispatch } = useDispatch( CART_STORE_KEY );
dispatch( removeCoupon( couponCode ) );
```
### addItemToCart
This action is used to add an item to the cart.
#### _Parameters_ <!-- omit in toc -->
- _productId_ `number`: Product ID to add to cart.
- _quantity_ `number` (default: `1`): The quantity of the product to add.
#### _Example_ <!-- omit in toc -->
```js
const { dispatch } = useDispatch( CART_STORE_KEY );
dispatch( addItemToCart( productId, quantity ) );
```
### removeItemFromCart
This action is used to remove an item from the cart.
#### _Parameters_ <!-- omit in toc -->
- _cartItemKey_ `string`: Cart item being updated.
#### _Example_ <!-- omit in toc -->
```js
const { dispatch } = useDispatch( CART_STORE_KEY );
dispatch( removeItemFromCart( cartItemKey ) );
```
### changeCartItemQuantity
This action is used to change the quantity of an item in the cart.
#### _Parameters_ <!-- omit in toc -->
- _cartItemKey_ `string`: Cart item being updated.
- _quantity_ `number`: Quantity of the item.
#### _Example_ <!-- omit in toc -->
```js
const { dispatch } = useDispatch( CART_STORE_KEY );
dispatch( changeCartItemQuantity( cartItemKey, quantity ) );
```
### selectShippingRate
This action is used to select a shipping rate for the cart.
#### _Parameters_ <!-- omit in toc -->
- _rateId_ `string`: The ID of the shipping rate to select.
- _packageId_ `number | string` (default: `null`): The key of the packages that will select within the shipping rate.
#### _Example_ <!-- omit in toc -->
```js
const { dispatch } = useDispatch( CART_STORE_KEY );
dispatch( selectShippingRate( rateId, packageId ) );
```
### setBillingAddress
This action is used to set the billing address for the cart locally, as opposed to updateCustomerData which sends it to the server.
#### _Parameters_ <!-- omit in toc -->
- _billingAddress_ `object`: Billing address that needs to be set. The keys are as following:
- _first_name_ `string`: The first name.
- _last_name_ `string`: The last name.
- _company_ `string`: The company name.
- _address_1_ `string`: The address line 1.
- _address_2_ `string`: The address line 2.
- _city_ `string`: The city name.
- _state_ `string`: The state name.
- _postcode_ `string`: The postcode.
- _country_ `string`: The country name.
#### _Example_ <!-- omit in toc -->
```js
const { dispatch } = useDispatch( CART_STORE_KEY );
dispatch( setBillingAddress( billingAddress ) );
```
### setShippingAddress
This action is used to set the shipping address for the cart locally, as opposed to updateCustomerData which sends it to the server.
#### _Parameters_ <!-- omit in toc -->
- _shippingAddress_ `object`: Shipping address that needs to be set. The keys are as following:
- _first_name_ `string`: The first name.
- _last_name_ `string`: The last name.
- _company_ `string`: The company name.
- _address_1_ `string`: The address line 1.
- _address_2_ `string`: The address line 2.
- _city_ `string`: The city name.
- _state_ `string`: The state name.
- _postcode_ `string`: The postcode.
- _country_ `string`: The country name.
#### _Example_ <!-- omit in toc -->
```js
const { dispatch } = useDispatch( CART_STORE_KEY );
dispatch( setShippingAddress( shippingAddress ) );
```
### updateCustomerData
This action is used to updates the shipping and/or billing address for the customer and returns an updated cart.
#### _Parameters_ <!-- omit in toc -->
- _customerData_ `object`: Customer billing and shipping address. The keys are as following:
- _shippingAddress_ `object`: The shipping address with the following keys:
- _first_name_ `string`: The first name.
- _last_name_ `string`: The last name.
- _company_ `string`: The company name.
- _address_1_ `string`: The address line 1.
- _address_2_ `string`: The address line 2.
- _city_ `string`: The city name.
- _state_ `string`: The state name.
- _postcode_ `string`: The postcode.
- _country_ `string`: The country name.
- _billingAddress_ `object`: The billing address (same keys as shipping address).
- `editing: boolean` (default: `true`): If the address is being edited, we don't update the customer data in the store from the response.
#### _Example_ <!-- omit in toc -->
```js
const { dispatch } = useDispatch( CART_STORE_KEY );
dispatch( updateCustomerData( customerData, editing ) );
```
## Selectors
### getCartData
Returns the Cart data from the state.
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
#### _Returns_ <!-- omit in toc -->
- `object`: The current cart data with the following keys:
- _coupons_ `array`: The coupon items in the cart.
- _shippingRates_ `array`: The cart shipping rates (see `getShippingRates` selector).
- _shippingAddress_ `object`: The shipping address (see `getCustomerData` selector).
- _billingAddress_ `object`: The billing address.
- _items_ `array`: The cart items.
- _itemsCount_ `number`: The total number of items in the cart
- _itemsWeight_ `number`: The total weight of items in the cart.
- _crossSells_ `array`: The cross sells items.
- _needsPayment_ `boolean`: If the cart needs payment.
- _needsShipping_ `boolean`: If the cart needs shipping.
- _hasCalculatedShipping_ `boolean`: If the cart has calculated shipping.
- _fees_ `array`: The cart fees.
- _totals_ `object`: The cart totals (see `getCartTotals` selector).
- _errors_ `array`: The cart errors (see `getCartErrors` selector).
- _paymentRequirements_ `object`: The payment requirements for the cart.
- _extensions_ `object`: The extensions data.
#### _Example_ <!-- omit in toc -->
```js
const store = select( CART_STORE_KEY );
const cartData = store.getCartData();
```
### getCustomerData
Returns the shipping and billing address from the state.
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
#### _Returns_ <!-- omit in toc -->
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
- `object`: The current shipping and billing address with the following keys:
- _shippingAddress_ `object`: The shipping address with the following keys:
- _first_name_ `string`: The first name.
- _last_name_ `string`: The last name.
- _company_ `string`: The company name.
- _address_1_ `string`: The address line 1.
- _address_2_ `string`: The address line 2.
- _city_ `string`: The city name.
- _state_ `string`: The state name.
- _postcode_ `string`: The postcode.
- _country_ `string`: The country name.
- _billingAddress_ `object`: The billing address (same keys as shipping address).
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
#### _Example_ <!-- omit in toc -->
```js
const store = select( CART_STORE_KEY );
const customerData = store.getCustomerData();
```
### getShippingRates
Returns the shipping rates from the state.
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
#### _Returns_ <!-- omit in toc -->
- `array`: The shipping rates. They keys are as following:
- _id_ `string`: The shipping rate ID.
- _label_ `string`: The shipping rate label.
- _cost_ `string`: The shipping rate cost.
- _package_id_ `number`: The shipping rate package ID.
- _meta_data_ `array`: The shipping rate meta data. The keys are as following:
- _id_ `number`: The shipping rate meta data ID.
- _key_ `string`: The shipping rate meta data key.
- _value_ `string`: The shipping rate meta data value.
- _taxes_ `array`: The shipping rate taxes.
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
#### _Example_ <!-- omit in toc -->
```js
const store = select( CART_STORE_KEY );
const shippingRates = store.getShippingRates();
```
### getNeedsShipping
Queries whether the cart needs shipping.
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
#### _Returns_ <!-- omit in toc -->
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
- `boolean`: True if the cart needs shipping.
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
#### _Example_ <!-- omit in toc -->
```js
const store = select( CART_STORE_KEY );
const needsShipping = store.getNeedsShipping();
```
### getHasCalculatedShipping
Queries whether the cart shipping has been calculated.
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
#### _Returns_ <!-- omit in toc -->
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
- `boolean`: True if the shipping has been calculated.
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
#### _Example_ <!-- omit in toc -->
```js
const store = select( CART_STORE_KEY );
const hasCalculatedShipping = store.getHasCalculatedShipping();
```
### getCartTotals
Returns the cart totals from state.
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
#### _Returns_ <!-- omit in toc -->
- `object`: The current cart totals with the following keys:
- _total_items_ `string`: The sum total of items in the cart without discount, tax or shipping.
- _total_items_tax_ `string`: The total tax on all items before discount.
- _total_fees_ `string`: The total transaction fees.
- _total_fees_tax_ `string`: The tax on the total transaction fees.
- _total_discount_ `string`: The total discount applied to the cart.
- _total_discount_tax_ `string`: The tax applied to the total discount amount.
- _total_shipping_ `string`: The total shipping cost.
- _total_shipping_tax_ `string`: The tax applied to the total shipping cost.
- _total_tax_ `string`: The total tax applied to the cart.
- _total_price_ `string`: The total price of the cart including discount, tax or shipping.
- _tax_lines_ `array` of object: The tax lines: `name`, `price`, and `rate`.
- _currency_code_ `string`: The currency code for the cart.
- _currency_symbol_ `string`: The currency symbol for the cart.
- _currency_minor_unit_ `integer`: The currency minor unit for the cart.
- _currency_decimal_separator_ `string`: The currency decimal separator for the cart.
- _currency_thousand_separator_ `string`: The currency thousand separator for the cart.
- _currency_prefix_ `string`: The currency prefix for the cart.
- _currency_suffix_ `string`: The currency suffix for the cart.
#### _Example_ <!-- omit in toc -->
```js
const store = select( CART_STORE_KEY );
const cartTotals = store.getCartTotals();
```
### getCartMeta
Returns the cart meta from state.
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
#### _Returns_ <!-- omit in toc -->
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
- `object`: The current cart meta with the following keys:
- _updatingCustomerData_ `boolean`: If the customer data is being updated.
- _updatingSelectedRate_ `boolean`: If the selected rate is being updated.
- _isCartDataStale_ `boolean`: If the cart data is stale.
- _applyingCoupon_ `string`: The coupon code being applied.
- _removingCoupon_ `string`: The coupon code being removed.
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
#### _Example_ <!-- omit in toc -->
```js
const store = select( CART_STORE_KEY );
const cartMeta = store.getCartMeta();
```
### getCartErrors
Returns the cart errors from state if cart receives customer facing errors from the API.
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
#### _Returns_ <!-- omit in toc -->
- `array`: The cart errors with the following keys:
- _code_ `string`: The error code.
- _message_ `string`: The error message.
- _data_ `object`: API response data.
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
#### _Example_ <!-- omit in toc -->
```js
const store = select( CART_STORE_KEY );
const cartErrors = store.getCartErrors();
```
### isApplyingCoupon
Queries whether a coupon is being applied.
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
#### _Returns_ <!-- omit in toc -->
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
- `boolean`: True if a coupon is being applied.
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
#### _Example_ <!-- omit in toc -->
```js
const store = select( CART_STORE_KEY );
const isApplyingCoupon = store.isApplyingCoupon();
```
### isCartDataStale
Queries whether the cart data is stale.
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
#### _Returns_ <!-- omit in toc -->
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
- `boolean`: True if the cart data is stale.
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
#### _Example_ <!-- omit in toc -->
```js
const store = select( CART_STORE_KEY );
const isCartDataStale = store.isCartDataStale();
```
### getCouponBeingApplied
Returns the coupon code being applied.
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
#### _Returns_ <!-- omit in toc -->
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
- `string`: The coupon code being applied.
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
#### _Example_ <!-- omit in toc -->
```js
const store = select( CART_STORE_KEY );
const couponBeingApplied = store.getCouponBeingApplied();
```
### isRemovingCoupon
Queries whether a coupon is being removed.
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
#### _Returns_ <!-- omit in toc -->
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
- `boolean`: True if a coupon is being removed.
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
#### _Example_ <!-- omit in toc -->
```js
const store = select( CART_STORE_KEY );
const isRemovingCoupon = store.isRemovingCoupon();
```
### getCouponBeingRemoved
Returns the coupon code being removed.
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
#### _Returns_ <!-- omit in toc -->
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
- `string`: The coupon code being removed.
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
#### _Example_ <!-- omit in toc -->
```js
const store = select( CART_STORE_KEY );
const couponBeingRemoved = store.getCouponBeingRemoved();
```
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
### getCartItem( cartItemKey )
Returns a cart item from the state.
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
#### _Parameters_ <!-- omit in toc -->
- _cartItemKey_ `string`: The cart item key.
#### _Returns_ <!-- omit in toc -->
- `object`: The cart item with the following keys:
- _key_ `string`: The cart item key.
- _id_ `number`: The cart item id.
- _catalog_visibility_ `string`: The catalog visibility.
- _quantity_limits_ `object`: The quantity limits.
- _name_ `string`: The cart item name.
- _summary_ `string`: The cart item summary.
- _short_description_ `string`: The cart item short description.
- _description_ `string`: The cart item description.
- _sku_ `string`: The cart item sku.
- _low_stock_remaining_ `null` or `number`: The low stock remaining.
- _backorders_allowed_ `boolean` indicating if backorders are allowed.
- _show_backorder_badge_ `boolean` indicating if the backorder badge should be shown.
- _sold_individually_ `boolean` indicating if the item is sold individually.
- _permalink_ `string`: The cart item permalink.
- _images_ `array`: The cart item images.
- _variation_ `array`: The cart item variation.
- _prices_ `object`: The cart item prices with the following keys:
- _currency_code_ `string`: The currency code.
- _currency_symbol_ `string`: The currency symbol.
- _currency_minor_unit_ `number`: The currency minor unit.
- _currency_decimal_separator_ `string`: The currency decimal separator.
- _currency_thousand_separator_ `string`: The currency thousand separator.
- _currency_prefix_ `string`: The currency prefix.
- _currency_suffix_ `string`: The currency suffix.
- _price_ `string`: The cart item price.
- _regular_price_ `string`: The cart item regular price.
- _sale_price_ `string`: The cart item sale price.
- _price_range_ `string`: The cart item price range.
- _totals_ `object`: The cart item totals with the following keys:
- _currency_code_ `string`: The currency code.
- _currency_symbol_ `string`: The currency symbol.
- _currency_minor_unit_ `number`: The currency minor unit.
- _currency_decimal_separator_ `string`: The currency decimal separator.
- _currency_thousand_separator_ `string`: The currency thousand separator.
- _currency_prefix_ `string`: The currency prefix.
- _currency_suffix_ `string`: The currency suffix.
- _line_subtotal_ `string`: The cart item line subtotal.
- _line_subtotal_tax_ `string`: The cart item line subtotal tax.
- _line_total_ `string`: The cart item line total.
- _line_total_tax_ `string`: The cart item line total tax.
#### _Example_ <!-- omit in toc -->
```js
const store = select( CART_STORE_KEY );
const cartItem = store.getCartItem( cartItemKey );
```
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
### isItemPendingQuantity( cartItemKey )
Queries whether a cart item is pending quantity.
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
#### _Parameters_ <!-- omit in toc -->
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
- _cartItemKey_ `string`: The cart item key.
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
#### _Returns_ <!-- omit in toc -->
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
- `boolean`: True if the cart item is pending quantity.
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
#### _Example_ <!-- omit in toc -->
```js
const store = select( CART_STORE_KEY );
const isItemPendingQuantity = store.isItemPendingQuantity( cartItemKey );
```
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
### isItemPendingDelete( cartItemKey )
Queries whether a cart item is pending delete.
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
#### _Parameters_ <!-- omit in toc -->
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
- _cartItemKey_ `string`: The cart item key.
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
#### _Returns_ <!-- omit in toc -->
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
- `boolean`: True if the cart item is pending delete.
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
#### _Example_ <!-- omit in toc -->
```js
const store = select( CART_STORE_KEY );
const isItemPendingDelete = store.isItemPendingDelete( cartItemKey );
```
### isCustomerDataUpdating
Queries whether the customer data is being updated.
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
#### _Returns_ <!-- omit in toc -->
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
- `boolean`: True if the customer data is being updated.
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
#### _Example_ <!-- omit in toc -->
```js
const store = select( CART_STORE_KEY );
const isCustomerDataUpdating = store.isCustomerDataUpdating();
```
### isShippingRateBeingSelected
Queries whether a shipping rate is being selected.
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
#### _Returns_ <!-- omit in toc -->
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
- `boolean`: True if a shipping rate is being selected.
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
#### _Example_ <!-- omit in toc -->
```js
const store = select( CART_STORE_KEY );
const isShippingRateBeingSelected = store.isShippingRateBeingSelected();
```
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
### getItemsPendingQuantityUpdate
Retrieves the item keys for items whose quantity is currently being updated.
#### _Returns_ <!-- omit in toc -->
- `string[]`: An array with the item keys for items whose quantity is currently being updated.
#### _Example_ <!-- omit in toc -->
```js
const store = select( CART_STORE_KEY );
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
const itemsPendingQuantityUpdate = store.getItemsPendingQuantityUpdate();
```
### getItemsPendingDelete
Retrieves the item keys for items that are currently being deleted.
#### _Returns_ <!-- omit in toc -->
- `string[]`: An array with the item keys for items that are currently being deleted.
#### _Example_ <!-- omit in toc -->
```js
const store = select( CART_STORE_KEY );
Improve the data stores documentation (https://github.com/woocommerce/woocommerce-blocks/pull/11336) * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Update data store docs * Link related docs to /docs/third-party-developers/extensibility/data-store * Improve data store overview * Remove obsolete entry * Update TOC of docs/third-party-developers/extensibility/data-store/store-notices.md * Update TOCs * Update link titles * Replace primary key with import statement * Optimise Validation Store description * Keep store IDs in title * Correct wrong key * Optimise data store docs overview * Explain the difference between cart and checkout store * Add example to Validation Store * Add example to Validation Store * Add overview text to collections.md * Add example to store-notices.md * Update TOC of store-notices.md * Update overview description of store-notices.md * Add code snippets for displaying the validationError message * Mention full link in assets/js/data/cart/README.md * Changed Store-Notices to Store Notices
2023-10-26 02:37:13 +00:00
const itemsPendingDelete = store.getItemsPendingDelete();
```
<!-- FEEDBACK -->
---
[Docs] Update links from WooCommerce.com to Woo.com for the Woo Blocks documentation (#43055) * Update woocommerce.com URLs in documentation and code files * Add changelog * Fix github repository link in extend-rest-api-add-custom-fields.md Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> * Add github reporter (#42974) * Add github reporter * Add changelog --------- Co-authored-by: Jon Lane <jon.lane@automattic.com> * Fix product task redirect to support grouped and external products (#43051) * Rearrange product redirection logic to better accept grouped and external produc types * Add changelog * Modify feedback modal actions (#43005) * Adapt feedback modal actions * Add changelogs * Modify comments * Fix tests * Fix test * Update class-wc-gateway-bacs.php (#43054) * Update class-wc-gateway-bacs.php Fix typo in textdomain * Add changefile(s) from automation for the following project(s): woocommerce --------- Co-authored-by: github-actions <github-actions@github.com> * [Product Block Editor]: Add `Linked product` tab (#43009) * add linked-products to group IDs * add Linked Products tab * tweak hideConditions condition * changelog * fix typo in doc comment * Introduce a product type selection within the new experience (#41823) * Create a relation between the product type and the product block template * Add 'patterns' to name the kind of products that can be created for a specific template * Resolve template using its id as a template query param * Rename ProductEditPattern to ProductTemplate * Rename get_patterns hook to woocommerce_product_editor_get_product_templates * Return the list of templates to the client * Set layout template events as array * Register the layout template based on the product template or the post type in case of product variations * Registering non supported product types * Create and register the woocommerce/product-details-section-description block * Add the product type to the section description * Create product type selector * Fix menu item style * Highlight selected menu item * Set the selected product template * Set product template title to lowercase in the content description * Rename blocks by blockTemplates under the AbstractBlockTemplate class * Rename to woocommerce_product_editor_product_templates filter * Remove product_template_ prefix from the supported_product_types map * Rename get_formatted to to_JSON and convert the props to client side like * Refactor get_product_templates * Fix icon resolution * Add a confirmation modal for unsupported product templates * Add changelog files * Remove product types using for testing * Fix redirection when changing to a non supported product template * Set the change button state to busy when it is saving the product * Fix php linter errors * Fix rebase conflict * Move ProductTemplate to Automattic\WooCommerce\Admin\Features\ProductBlockEditor namespace * Add the to_json definition to the BlockTemplateInterface * Create default product template by custom product type if it does not have a template associated yet * Fix some comments and product template creation validation * Add support to load the product template icon from an external resource * Fix php linter * Fix the changelog description * [Experimental] Interactivity Dropdown multi-select mode, ratings filter and introduce each directive (#42981) --------- Co-authored-by: David Arenas <david.arenas@automattic.com> * Introduce the transient files engine (#42877) Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com> * Change marketplace install API request to POST instead of GET (#43033) * Change marketplace install API to using POST instead of GET * Fix linting error * Add changefile(s) from automation for the following project(s): woocommerce --------- Co-authored-by: github-actions <github-actions@github.com> * Prep trunk for 8.6 cycle (#43021) Prep trunk for 8.6 cycle with version bump to 8.6.0-dev Co-authored-by: WooCommerce Bot <no-reply@woo.com> * Add Playwright tests for All Reviews, Reviews by Product and Reviews by Category blocks (#42903) * Remove Reviews blocks Puppeteer tests * Minor code cleanup * Typos * Create publishAndVisitPost() editor util * Fix subcategories when importing products in Playwright and add reviews * Add Reviews blocks tests in Playwright * More typos * Add changefile(s) from automation for the following project(s): woocommerce-blocks * Create a 'reviews' object in data.ts so we can store reviews data in one single place * Update test so instead of creating a new post in each test, we go to the already-created post * Add source comments to reviews data to match it with the script --------- Co-authored-by: github-actions <github-actions@github.com> * Release: Remove 8.5 change files (#43022) Delete changelog files from 8.5 release Co-authored-by: WooCommerce Bot <no-reply@woo.com> Co-authored-by: Alex López <alex.lopez@automattic.com> * Delete changelog files based on PR 43033 (#43079) Delete changelog files for 43033 Co-authored-by: WooCommerce Bot <no-reply@woo.com> * Delete changelog files based on PR 43051 (#43081) Delete changelog files for 43051 Co-authored-by: WooCommerce Bot <no-reply@woo.com> * Interactive Price Filter: use `context` instead of `state` (#42980) * feat: use context instead of state * fix: temporary move the context to inner element for diffing to work * fix: update context before navigation for optimistic UI * Load google analytics gtag script asynchronously in WooCommerce Blocks (#43040) Co-authored-by: github-actions <github-actions@github.com> * set WOOCOMMERCE_BLOCKS_PHASE to 1 for the production build (#43074) * set WOOCOMMERCE_BLOCKS_PHASE to 1 for the production build * Add changefile(s) from automation for the following project(s): woocommerce --------- Co-authored-by: github-actions <github-actions@github.com> * Revert "Fix schedule sales error" (#43094) Revert "Fix schedule sales error (#42700)" This reverts commit 9b800aa179b25bafebfed0da8c00eec892272cb4. * [Product Block Editor]: add Linked product sections. First approach. (#43013) * add Linked products, Upsell section * changelog * add Cross-lens section * add links to the Upsell sections * changelog * fix lint issues * fix lint issus * fix linting issue :-| * check whether the linked product group is defined * [Product Block Editor]: introduce ShoppingBags component (#43042) * add ShoppingBags component * Add ShoppingBag story * changelog * Fix: Collection data being leaked between Collection Filters blocks (#43044) * fix: CYS - change heading color (#43076) * fix: CYS - change heading color * Add changefile(s) from automation for the following project(s): woocommerce --------- Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: Patricia Hillebrandt <patriciahillebrandt@gmail.com> * Delete changelog files based on PR 43074 (#43118) Delete changelog files for 43074 Co-authored-by: WooCommerce Bot <no-reply@woo.com> * [Product Block Editor]: fix feature flag to hide the Linked products (#43119) * fix flag to hide/show product editor * changelog * Add changelog --------- Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> Co-authored-by: Jonathan Lane <lanej0@users.noreply.github.com> Co-authored-by: Jon Lane <jon.lane@automattic.com> Co-authored-by: louwie17 <lourensschep@gmail.com> Co-authored-by: Fernando Marichal <fernando.marichal@automattic.com> Co-authored-by: Marc Guay <marc.guay@gmail.com> Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: Damián Suárez <rdsuarez@gmail.com> Co-authored-by: Maikel David Pérez Gómez <maikel.perez@automattic.com> Co-authored-by: Sam Seay <samueljseay@gmail.com> Co-authored-by: Néstor Soriano <konamiman@konamiman.com> Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com> Co-authored-by: Kyle Nel <22053773+kdevnel@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: WooCommerce Bot <no-reply@woo.com> Co-authored-by: Alex López <alex.lopez@automattic.com> Co-authored-by: Tung Du <dinhtungdu@gmail.com> Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com> Co-authored-by: Luigi Teschio <gigitux@gmail.com> Co-authored-by: Patricia Hillebrandt <patriciahillebrandt@gmail.com>
2023-12-29 15:28:11 +00:00
[We're hiring!](https://woo.com/careers/) Come work with us!
2023-02-24 12:08:34 +00:00
🐞 Found a mistake, or have a suggestion? [Leave feedback about this document here.](https://github.com/woocommerce/woocommerce-blocks/issues/new?assignees=&labels=type%3A+documentation&template=--doc-feedback.md&title=Feedback%20on%20./docs/third-party-developers/extensibility/data-store/cart.md)
<!-- /FEEDBACK -->