woocommerce/plugins/woocommerce-blocks/assets/js/base/hooks
Mike Jolley 849e351a0e Sync shipping address with billing address when shipping address fields are disabled (https://github.com/woocommerce/woocommerce-blocks/pull/3358)
* Correct docblock description

* Sync shipping address changes with billing data

* Update inline documentation

* Revert address sync because it fails when shipping is disabled explicitely

* Avoid loading shipping address from customer is shipping is disabled

* Rather than update order from the wc/store/checkout request, update the customer object

This is turn is synced to order, but also allows the cart calcultions to use the posted data. This means that taxes will be updated based on address data even if not displayed on the checkout.

* Add action that combines billing and shipping updates

* Add route for updating billing and shipping address

* Sync billing data to server on change

* Shared constants for billing data

* Skip address update if missing country

* Allow null values to skip formatting

* Add billing to cart schema

* Removed unwanted hooks from previous commit

* Decoding is handled in useStoreCart

* Remove hook

* Make shipping context hold state

* Make billing context hold state

* Add address processors

* Cart does not have billing

* Update tests, remove some unrelated changes affecting the diff

* Revert "Update inline documentation"

This reverts commit 0393f49316de3152c6dcf6fda1192c06a74f1b55.

* Make shippingRatesAreResolving conditonal based on API request

* Shared address processor in cart and checkout

* Rename REST endpoint

* CustomerDataProvider and hook

* Update shipping address type defs

* Rename customer address endpoint, and remove update-shipping

* Update tests

* Fix tests by restoring country validation

* typo

* Update assets/js/base/hooks/cart/use-store-cart.js

Co-authored-by: Darren Ethier <darren@roughsmootheng.in>

* Simplify debounce and request handling

* Remove state from address sync

This will mean billing is "forgotten" if using the checbox, but this greatly simplifies logic.

* Rename shipping rates loading to customer data loading

* Sync based on useStoreCart data

* Made cart API less strict on addresses

* Fix useCheckoutAddress sync

* Add note on currentShippingAsBilling

* Use incoming isCart

* Add more detailed inline comment for shippingAsBilling toggle event

* Combine customer billing and shipping ref

* Update address docblock

* Error handling in pluckAddress

* Fix cart response after rebase

* Update customer tests

* Update src/StoreApi/Routes/CartUpdateCustomer.php

Co-authored-by: Darren Ethier <darren@roughsmootheng.in>

Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
2020-11-20 15:13:35 +00:00
..
cart Sync shipping address with billing address when shipping address fields are disabled (https://github.com/woocommerce/woocommerce-blocks/pull/3358) 2020-11-20 15:13:35 +00:00
checkout Sync shipping address with billing address when shipping address fields are disabled (https://github.com/woocommerce/woocommerce-blocks/pull/3358) 2020-11-20 15:13:35 +00:00
customer Sync shipping address with billing address when shipping address fields are disabled (https://github.com/woocommerce/woocommerce-blocks/pull/3358) 2020-11-20 15:13:35 +00:00
payment-methods Sync shipping address with billing address when shipping address fields are disabled (https://github.com/woocommerce/woocommerce-blocks/pull/3358) 2020-11-20 15:13:35 +00:00
shipping Sync shipping address with billing address when shipping address fields are disabled (https://github.com/woocommerce/woocommerce-blocks/pull/3358) 2020-11-20 15:13:35 +00:00
test Add useStoreNotices tests (https://github.com/woocommerce/woocommerce-blocks/pull/3162) 2020-09-18 14:50:45 -04:00
index.js Sync shipping address with billing address when shipping address fields are disabled (https://github.com/woocommerce/woocommerce-blocks/pull/3358) 2020-11-20 15:13:35 +00:00
use-collection-data.js Add contexts for checkout (https://github.com/woocommerce/woocommerce-blocks/pull/1915) 2020-03-10 09:39:21 -04:00
use-collection-header.js Active filters block (https://github.com/woocommerce/woocommerce-blocks/pull/1168) 2019-11-15 14:41:23 +00:00
use-collection.js Implement error handling for shipping rates and selected shipping rates. (https://github.com/woocommerce/woocommerce-blocks/pull/1956) 2020-03-13 16:05:45 -04:00
use-container-queries.js Show express payment methods in the Cart block (https://github.com/woocommerce/woocommerce-blocks/pull/3004) 2020-08-20 16:14:12 +02:00
use-position-relative-to-viewport.js Enable and fix all jsdoc rule violations (https://github.com/woocommerce/woocommerce-blocks/pull/3168) 2020-09-20 19:54:08 -04:00
use-previous.js Fix React hook dependency warnings in filter an All Products blocks (https://github.com/woocommerce/woocommerce-blocks/pull/3285) 2020-10-27 16:39:08 +01:00
use-query-state.js Fix React hook dependency warnings in filter an All Products blocks (https://github.com/woocommerce/woocommerce-blocks/pull/3285) 2020-10-27 16:39:08 +01:00
use-shallow-equal.js Update NPM dependencies and script dependency handling (https://github.com/woocommerce/woocommerce-blocks/pull/1337) 2019-12-10 12:17:46 -05:00
use-store-add-to-cart.js Introduce Atomic Add to Cart Block (https://github.com/woocommerce/woocommerce-blocks/pull/2705) 2020-06-17 10:52:03 +01:00
use-store-notices.js Add useStoreNotices tests (https://github.com/woocommerce/woocommerce-blocks/pull/3162) 2020-09-18 14:50:45 -04:00
use-store-products.js Add API fetch error handling (https://github.com/woocommerce/woocommerce-blocks/pull/1687) 2020-01-31 13:01:34 +00:00
use-throw-error.js Implement error handling for shipping rates and selected shipping rates. (https://github.com/woocommerce/woocommerce-blocks/pull/1956) 2020-03-13 16:05:45 -04:00
use-trigger-fragment-refresh.js Introduce Atomic Add to Cart Block (https://github.com/woocommerce/woocommerce-blocks/pull/2705) 2020-06-17 10:52:03 +01:00