woocommerce/plugins/woocommerce-blocks/assets/js/data/checkout
Thomas Roberts f4f842e716 Add "Collection from..." in Checkout sidebar when selecting local pickup (https://github.com/woocommerce/woocommerce-blocks/pull/8305)
* Add get_collectible_method_ids function

* Add collectibleMethodIds to asset data registry

* Remove unnecessary pluck and add pickup_location to returned array

* Add hasSelectedLocalPickup to shipping types

* show shipping address even if collecting

* Make checkout store set prefersCollection based on IDs from settings

* Move areRatesCollectible outside of hook

* Add pickup location component

* Show pickup location if user prefers collection

* Move prefersCollection check into ShippingAddress component

* Remove spread for collectibleMethodIds

Not needed now since pickup_location is included in the setting by default

* Check address metadata has a value before displaying it

* Add tests for ShippingAddress component

* Move PickupLocation specific tests to new file

* Ensure TotalsShipping shows only one package rate if local pickup chosen

* Update prefersCollection selector to use typeof check

* Use isPackageRateCollectible rather than checking against settings

* Do not show calculator button if local pickup rate is selected

* Update test to mock correct setting

* Remove unused method from ShippingController

* Check isPackageRateCollectable rather than checking settings array

* Update test to mock correct setting

* Change spelling of collectible to collectable

* Improve mocked useSelect function

Old one returned incorrect data shape for prefersCollection

* Remove duplicate import
2023-04-06 04:56:47 -07:00
..
test Refactor payment status (https://github.com/woocommerce/woocommerce-blocks/pull/8110) 2023-02-14 12:08:19 +00:00
action-types.ts Introduce shipping method toggle block 2023-01-12 15:34:44 +01:00
actions.ts Fix/extension data conflicts (https://github.com/woocommerce/woocommerce-blocks/pull/8354) 2023-02-03 11:18:18 +00:00
constants.ts Refactor payment status (https://github.com/woocommerce/woocommerce-blocks/pull/8110) 2023-02-14 12:08:19 +00:00
default-state.ts Maintain Local Pickup Selection (https://github.com/woocommerce/woocommerce-blocks/pull/7894) 2023-01-12 15:42:43 +01:00
index.ts Add thunk support for < WP 5.9 (https://github.com/woocommerce/woocommerce-blocks/pull/8136) 2023-01-09 15:01:49 -08:00
reducers.ts Refactor payment status (https://github.com/woocommerce/woocommerce-blocks/pull/8110) 2023-02-14 12:08:19 +00:00
selectors.ts Add "Collection from..." in Checkout sidebar when selecting local pickup (https://github.com/woocommerce/woocommerce-blocks/pull/8305) 2023-04-06 04:56:47 -07:00
thunks.ts Rename the checkout events (https://github.com/woocommerce/woocommerce-blocks/pull/8381) 2023-02-17 11:03:13 +00:00
types.ts Add stricter observer type checks in payments thunk to improve resilience to bad observer responses (https://github.com/woocommerce/woocommerce-blocks/pull/8319) 2023-02-13 03:43:57 -08:00
utils.ts Rename the checkout events (https://github.com/woocommerce/woocommerce-blocks/pull/8381) 2023-02-17 11:03:13 +00:00