* use full link for WordPress resources (https://github.com/woocommerce/woocommerce-blocks/pull/7211)
Co-authored-by: Niels Lange <info@nielslange.de>
* Empty commit for release pull request
* update readme
* add testing instructions
* add zip file link
* update testing instructions and changelog entry
* Bumping version strings to new version.
* Empty commit for release pull request
* Update styles of the Filter by Attribute dropdown so it looks good in TT3 (https://github.com/woocommerce/woocommerce-blocks/pull/7506)
* Use theme's body background color as the mini cart contents default background color (https://github.com/woocommerce/woocommerce-blocks/pull/7510)
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* Price Slider: use `currentColor` for the slider (https://github.com/woocommerce/woocommerce-blocks/pull/7527)
* Fixed Price Slider Issue
Located where the price slider was hard coded and replaced it.
* fix CSS lint
* use currentColor instead of hard-coded color for the slider of the Filter By Price block woocommerce/woocommerce-blocks#7130
use currentColor instead of hard-coded color for the slider of the Filte By Price block
* use currentColor instead of hard-coded color for the slider of the Filter By Price block woocommerce/woocommerce-blocks#7130
use currentColor instead of hard-coded color for the slider of the Filte By Price block
* remove background-color
Co-authored-by: EmptySet-Exe <46509186+EmptySet-Exe@users.noreply.github.com>
Co-authored-by: Niels Lange <info@nielslange.de>
* Make price slider 'inactive' range half transparent so it looks better in dark themes (https://github.com/woocommerce/woocommerce-blocks/pull/7525)
* Fix inconsistent button styling with TT3 (https://github.com/woocommerce/woocommerce-blocks/pull/7516)
* fix inconsistent button styling with TT3
* use wc_wp_theme_get_element_class_name
* add check to be sure that wc_wp_theme_get_element_class_name function exists
* Fix Mini Cart Block global styles woocommerce/woocommerce-blocks#7379 (https://github.com/woocommerce/woocommerce-blocks/pull/7515)
* Fix Mini Cart Block global styles woocommerce/woocommerce-blocks#7379
Fix Mini Cart Block global styles
* add font_size
* Empty commit for release pull request
* add changelog and testing instructions
* add zip link for testing
* Bumping version strings to new version.
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
Co-authored-by: Niels Lange <info@nielslange.de>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Luigi <gigitux@gmail.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
Co-authored-by: EmptySet-Exe <46509186+EmptySet-Exe@users.noreply.github.com>
* Empty commit for release pull request
* Calculate cart totals after running extensions (https://github.com/woocommerce/woocommerce-blocks/pull/7490)
* calculate cart totals afer running extensions
* update totlas call in CartUpdateCustomer
* test that cart is recalcing
* Update changelog in readme
* Add release testing notes
* Update release date in readme
* Bumping version strings to new version.
* update readme
* Update styles of the Filter by Attribute dropdown so it looks good in TT3 (https://github.com/woocommerce/woocommerce-blocks/pull/7506)
* Use theme's body background color as the mini cart contents default background color (https://github.com/woocommerce/woocommerce-blocks/pull/7510)
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* Price Slider: use `currentColor` for the slider (https://github.com/woocommerce/woocommerce-blocks/pull/7527)
* Fixed Price Slider Issue
Located where the price slider was hard coded and replaced it.
* fix CSS lint
* use currentColor instead of hard-coded color for the slider of the Filter By Price block woocommerce/woocommerce-blocks#7130
use currentColor instead of hard-coded color for the slider of the Filte By Price block
* use currentColor instead of hard-coded color for the slider of the Filter By Price block woocommerce/woocommerce-blocks#7130
use currentColor instead of hard-coded color for the slider of the Filte By Price block
* remove background-color
Co-authored-by: EmptySet-Exe <46509186+EmptySet-Exe@users.noreply.github.com>
Co-authored-by: Niels Lange <info@nielslange.de>
* Make price slider 'inactive' range half transparent so it looks better in dark themes (https://github.com/woocommerce/woocommerce-blocks/pull/7525)
* Fix inconsistent button styling with TT3 (https://github.com/woocommerce/woocommerce-blocks/pull/7516)
* fix inconsistent button styling with TT3
* use wc_wp_theme_get_element_class_name
* add check to be sure that wc_wp_theme_get_element_class_name function exists
* Fix Mini Cart Block global styles woocommerce/woocommerce-blocks#7379 (https://github.com/woocommerce/woocommerce-blocks/pull/7515)
* Fix Mini Cart Block global styles woocommerce/woocommerce-blocks#7379
Fix Mini Cart Block global styles
* add font_size
* upload a new build
* Bumping version strings to new version.
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
Co-authored-by: Luigi <gigitux@gmail.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
Co-authored-by: EmptySet-Exe <46509186+EmptySet-Exe@users.noreply.github.com>
Co-authored-by: Niels Lange <info@nielslange.de>
* Empty commit for release pull request
* Added readme.txt changelog entry
* Update HPOS compatibility snippet (https://github.com/woocommerce/woocommerce-blocks/pull/7395)
* 8.7.2 Testing notes
* Update testing notes
* Update testing notes
* Bumped version
* Refactor force billing: remove forcedBillingAddress from conditions for showBillingFields (https://github.com/woocommerce/woocommerce-blocks/pull/7393)
Co-authored-by: Niels Lange <info@nielslange.de>
* Updated testing instructions and changelog to include woocommerce/woocommerce-blocks#7393
* Updated testing zip
* Bumping version strings to new version.
* Empty commit for release pull request
* Fix wrong keys being sent in `canMakePayment` and customer data showing in the Checkout block in the editor (https://github.com/woocommerce/woocommerce-blocks/pull/7434)
* Construct args for canMakePayment with correct keys
* When the CheckoutEventsContext mounts, initialize payment store
* Destructure useSelect correctly
* Dispatch __internalInitializePaymentStore in selector tests
* Update selector name to __internalUpdateAvailablePaymentMethods
* Remove check for editor when registering checkout store
* Add check for when express payment methods have updated too
* Ensure billingAddress key exists in canMakePayment arg
* Use editor context to know if we're in editor
* Updated readme.txt
* Reverted stable tag change on readme.txt
* Testing instructions
* Cleaned out testing instructions
* Bumping version strings to new version.
* Empty commit for release pull request
* Testing instructions
* package-lock.json version bump
* Revert "Fix `useForcedLayout` to re-select inner blocks after we manually insert one (https://github.com/woocommerce/woocommerce-blocks/pull/6676)" (https://github.com/woocommerce/woocommerce-blocks/pull/7447)
This reverts commit 25e24708b5.
* Testing zip
* Bumping version strings to new version.
* add testing instructions
* upload a new zip file
* Update styles of the Filter by Attribute dropdown so it looks good in TT3 (https://github.com/woocommerce/woocommerce-blocks/pull/7506)
* Use theme's body background color as the mini cart contents default background color (https://github.com/woocommerce/woocommerce-blocks/pull/7510)
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* Price Slider: use `currentColor` for the slider (https://github.com/woocommerce/woocommerce-blocks/pull/7527)
* Fixed Price Slider Issue
Located where the price slider was hard coded and replaced it.
* fix CSS lint
* use currentColor instead of hard-coded color for the slider of the Filter By Price block woocommerce/woocommerce-blocks#7130
use currentColor instead of hard-coded color for the slider of the Filte By Price block
* use currentColor instead of hard-coded color for the slider of the Filter By Price block woocommerce/woocommerce-blocks#7130
use currentColor instead of hard-coded color for the slider of the Filte By Price block
* remove background-color
Co-authored-by: EmptySet-Exe <46509186+EmptySet-Exe@users.noreply.github.com>
Co-authored-by: Niels Lange <info@nielslange.de>
* Make price slider 'inactive' range half transparent so it looks better in dark themes (https://github.com/woocommerce/woocommerce-blocks/pull/7525)
* Fix inconsistent button styling with TT3 (https://github.com/woocommerce/woocommerce-blocks/pull/7516)
* fix inconsistent button styling with TT3
* use wc_wp_theme_get_element_class_name
* add check to be sure that wc_wp_theme_get_element_class_name function exists
* Fix Mini Cart Block global styles woocommerce/woocommerce-blocks#7379 (https://github.com/woocommerce/woocommerce-blocks/pull/7515)
* Fix Mini Cart Block global styles woocommerce/woocommerce-blocks#7379
Fix Mini Cart Block global styles
* add font_size
* upload a new build
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
Co-authored-by: Tarun Vijwani <tarun.vijwani@automattic.com>
Co-authored-by: Niels Lange <info@nielslange.de>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
Co-authored-by: Luigi <gigitux@gmail.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
Co-authored-by: EmptySet-Exe <46509186+EmptySet-Exe@users.noreply.github.com>
* Empty commit for release pull request
* Updated changelog.
* Minor lint fix.
* 8.7.0 Testing instructions
* Updated and tidy docs/internal-developers/testing/releases/README.md
* Add filter-link-button mixin (https://github.com/woocommerce/woocommerce-blocks/pull/7357)
* Set default style to link-button mixin
It was identified that we currently have 3 different behaviors for links used in the application. In issue woocommerce/woocommerce-blocks#1778, it was discussed a set of good practices that we should follow in order to obtain consistency between links.
Currently, the link-button mixin is already used by the 'Clear all' button in the Active Filters block, so the idea was to increment it with a common pattern (font size small, font-weight normal, underlined by default and not underlined when on hover) that can be reused by other components (for example FilterResetButton).
* Change link-button mixin to make it attend the expected default style for links
* Replace text-button with link-button mixin in FilterResetButton component
* Add new mixin for links in filter blocks
* Revert change to link-button mixin to prevent it to affect link buttons on Checkout page
* Add filter-link-button mixin that can be used in filter blocks
* Remove link-button styles that were moved to filter-link-button mixin
By default, link-button mixin styles should have only styles from the text-button mixin and also be underlined.
The styles for link button in filter blocks should reside in filter-link-button mixin.
* Cherry picked Add filter-link-button mixin woocommerce/woocommerce-blocks#7357 and updated testing instructions
* Re-added woocommerce/woocommerce-blocks#7273 to changelog
* Correct block name and description (https://github.com/woocommerce/woocommerce-blocks/pull/7354)
* Correct block name and description
* remove duplicated description for controls blocks
* remove duplicated title and desc
* Revert "remove duplicated description for controls blocks"
This reverts commit ed5417eb0e5191ed2f1def2a04c9e724fe70856a.
* removed woocommerce/woocommerce-blocks#7338 from testing instructions and changelog
* Updated testing zip package.
* Minor formatting fix on the release instructions
* change any to or below the express payment method on cart (https://github.com/woocommerce/woocommerce-blocks/pull/7369)
* Updated zip.
* Add temporary workaround to fix inserting Cart block in WordPress.com (https://github.com/woocommerce/woocommerce-blocks/pull/7367)
* remove problematic actions as deps
* add inline docs
* add todo comment
* Cherry picked: Fix a problem that causes an infinite loop when inserting Cart block in wordpress.com (7367)
* Updated testing zip.
* Bumping version strings to new version.
* Empty commit for release pull request
* Release: 8.7.1 (https://github.com/woocommerce/woocommerce-blocks/pull/7371)
* Empty commit for release pull request
* Updated changelog.
* Minor lint fix.
* 8.7.0 Testing instructions
* Updated and tidy docs/internal-developers/testing/releases/README.md
* Add filter-link-button mixin (https://github.com/woocommerce/woocommerce-blocks/pull/7357)
* Set default style to link-button mixin
It was identified that we currently have 3 different behaviors for links used in the application. In issue woocommerce/woocommerce-blocks#1778, it was discussed a set of good practices that we should follow in order to obtain consistency between links.
Currently, the link-button mixin is already used by the 'Clear all' button in the Active Filters block, so the idea was to increment it with a common pattern (font size small, font-weight normal, underlined by default and not underlined when on hover) that can be reused by other components (for example FilterResetButton).
* Change link-button mixin to make it attend the expected default style for links
* Replace text-button with link-button mixin in FilterResetButton component
* Add new mixin for links in filter blocks
* Revert change to link-button mixin to prevent it to affect link buttons on Checkout page
* Add filter-link-button mixin that can be used in filter blocks
* Remove link-button styles that were moved to filter-link-button mixin
By default, link-button mixin styles should have only styles from the text-button mixin and also be underlined.
The styles for link button in filter blocks should reside in filter-link-button mixin.
* Cherry picked Add filter-link-button mixin woocommerce/woocommerce-blocks#7357 and updated testing instructions
* Re-added woocommerce/woocommerce-blocks#7273 to changelog
* Correct block name and description (https://github.com/woocommerce/woocommerce-blocks/pull/7354)
* Correct block name and description
* remove duplicated description for controls blocks
* remove duplicated title and desc
* Revert "remove duplicated description for controls blocks"
This reverts commit ed5417eb0e5191ed2f1def2a04c9e724fe70856a.
* removed woocommerce/woocommerce-blocks#7338 from testing instructions and changelog
* Updated testing zip package.
* Minor formatting fix on the release instructions
* change any to or below the express payment method on cart (https://github.com/woocommerce/woocommerce-blocks/pull/7369)
* Updated zip.
* Add temporary workaround to fix inserting Cart block in WordPress.com (https://github.com/woocommerce/woocommerce-blocks/pull/7367)
* remove problematic actions as deps
* add inline docs
* add todo comment
* Cherry picked: Fix a problem that causes an infinite loop when inserting Cart block in wordpress.com (7367)
* Updated testing zip.
* Bumping version strings to new version.
* Empty commit for release pull request
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
Co-authored-by: Alexandre Lara <allexandrelara@gmail.com>
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
* Release: 8.7.2 (https://github.com/woocommerce/woocommerce-blocks/pull/7396)
* Empty commit for release pull request
* Added readme.txt changelog entry
* Update HPOS compatibility snippet (https://github.com/woocommerce/woocommerce-blocks/pull/7395)
* 8.7.2 Testing notes
* Update testing notes
* Update testing notes
* Bumped version
* Refactor force billing: remove forcedBillingAddress from conditions for showBillingFields (https://github.com/woocommerce/woocommerce-blocks/pull/7393)
Co-authored-by: Niels Lange <info@nielslange.de>
* Updated testing instructions and changelog to include woocommerce/woocommerce-blocks#7393
* Updated testing zip
* Bumping version strings to new version.
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
Co-authored-by: Tarun Vijwani <tarun.vijwani@automattic.com>
Co-authored-by: Niels Lange <info@nielslange.de>
* Release: 8.7.3 (https://github.com/woocommerce/woocommerce-blocks/pull/7439)
* Empty commit for release pull request
* Added readme.txt changelog entry
* Update HPOS compatibility snippet (https://github.com/woocommerce/woocommerce-blocks/pull/7395)
* 8.7.2 Testing notes
* Update testing notes
* Update testing notes
* Bumped version
* Refactor force billing: remove forcedBillingAddress from conditions for showBillingFields (https://github.com/woocommerce/woocommerce-blocks/pull/7393)
Co-authored-by: Niels Lange <info@nielslange.de>
* Updated testing instructions and changelog to include woocommerce/woocommerce-blocks#7393
* Updated testing zip
* Bumping version strings to new version.
* Empty commit for release pull request
* Fix wrong keys being sent in `canMakePayment` and customer data showing in the Checkout block in the editor (https://github.com/woocommerce/woocommerce-blocks/pull/7434)
* Construct args for canMakePayment with correct keys
* When the CheckoutEventsContext mounts, initialize payment store
* Destructure useSelect correctly
* Dispatch __internalInitializePaymentStore in selector tests
* Update selector name to __internalUpdateAvailablePaymentMethods
* Remove check for editor when registering checkout store
* Add check for when express payment methods have updated too
* Ensure billingAddress key exists in canMakePayment arg
* Use editor context to know if we're in editor
* Updated readme.txt
* Reverted stable tag change on readme.txt
* Testing instructions
* Cleaned out testing instructions
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
Co-authored-by: Tarun Vijwani <tarun.vijwani@automattic.com>
Co-authored-by: Niels Lange <info@nielslange.de>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* Release: 8.7.4 (https://github.com/woocommerce/woocommerce-blocks/pull/7449)
* Empty commit for release pull request
* Added readme.txt changelog entry
* Update HPOS compatibility snippet (https://github.com/woocommerce/woocommerce-blocks/pull/7395)
* 8.7.2 Testing notes
* Update testing notes
* Update testing notes
* Bumped version
* Refactor force billing: remove forcedBillingAddress from conditions for showBillingFields (https://github.com/woocommerce/woocommerce-blocks/pull/7393)
Co-authored-by: Niels Lange <info@nielslange.de>
* Updated testing instructions and changelog to include woocommerce/woocommerce-blocks#7393
* Updated testing zip
* Bumping version strings to new version.
* Empty commit for release pull request
* Fix wrong keys being sent in `canMakePayment` and customer data showing in the Checkout block in the editor (https://github.com/woocommerce/woocommerce-blocks/pull/7434)
* Construct args for canMakePayment with correct keys
* When the CheckoutEventsContext mounts, initialize payment store
* Destructure useSelect correctly
* Dispatch __internalInitializePaymentStore in selector tests
* Update selector name to __internalUpdateAvailablePaymentMethods
* Remove check for editor when registering checkout store
* Add check for when express payment methods have updated too
* Ensure billingAddress key exists in canMakePayment arg
* Use editor context to know if we're in editor
* Updated readme.txt
* Reverted stable tag change on readme.txt
* Testing instructions
* Cleaned out testing instructions
* Bumping version strings to new version.
* Empty commit for release pull request
* Testing instructions
* package-lock.json version bump
* Revert "Fix `useForcedLayout` to re-select inner blocks after we manually insert one (https://github.com/woocommerce/woocommerce-blocks/pull/6676)" (https://github.com/woocommerce/woocommerce-blocks/pull/7447)
This reverts commit 25e24708b5.
* Testing zip
* Bumping version strings to new version.
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
Co-authored-by: Tarun Vijwani <tarun.vijwani@automattic.com>
Co-authored-by: Niels Lange <info@nielslange.de>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Alexandre Lara <allexandrelara@gmail.com>
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Tarun Vijwani <tarun.vijwani@automattic.com>
Co-authored-by: Niels Lange <info@nielslange.de>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* Empty commit for release pull request
* Added readme.txt changelog entry
* Update HPOS compatibility snippet (https://github.com/woocommerce/woocommerce-blocks/pull/7395)
* 8.7.2 Testing notes
* Update testing notes
* Update testing notes
* Bumped version
* Refactor force billing: remove forcedBillingAddress from conditions for showBillingFields (https://github.com/woocommerce/woocommerce-blocks/pull/7393)
Co-authored-by: Niels Lange <info@nielslange.de>
* Updated testing instructions and changelog to include woocommerce/woocommerce-blocks#7393
* Updated testing zip
* Bumping version strings to new version.
* Empty commit for release pull request
* Fix wrong keys being sent in `canMakePayment` and customer data showing in the Checkout block in the editor (https://github.com/woocommerce/woocommerce-blocks/pull/7434)
* Construct args for canMakePayment with correct keys
* When the CheckoutEventsContext mounts, initialize payment store
* Destructure useSelect correctly
* Dispatch __internalInitializePaymentStore in selector tests
* Update selector name to __internalUpdateAvailablePaymentMethods
* Remove check for editor when registering checkout store
* Add check for when express payment methods have updated too
* Ensure billingAddress key exists in canMakePayment arg
* Use editor context to know if we're in editor
* Updated readme.txt
* Reverted stable tag change on readme.txt
* Testing instructions
* Cleaned out testing instructions
* Bumping version strings to new version.
* Empty commit for release pull request
* Testing instructions
* package-lock.json version bump
* Revert "Fix `useForcedLayout` to re-select inner blocks after we manually insert one (https://github.com/woocommerce/woocommerce-blocks/pull/6676)" (https://github.com/woocommerce/woocommerce-blocks/pull/7447)
This reverts commit 25e24708b5.
* Testing zip
* Bumping version strings to new version.
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
Co-authored-by: Tarun Vijwani <tarun.vijwani@automattic.com>
Co-authored-by: Niels Lange <info@nielslange.de>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* Empty commit for release pull request
* Added readme.txt changelog entry
* Update HPOS compatibility snippet (https://github.com/woocommerce/woocommerce-blocks/pull/7395)
* 8.7.2 Testing notes
* Update testing notes
* Update testing notes
* Bumped version
* Refactor force billing: remove forcedBillingAddress from conditions for showBillingFields (https://github.com/woocommerce/woocommerce-blocks/pull/7393)
Co-authored-by: Niels Lange <info@nielslange.de>
* Updated testing instructions and changelog to include woocommerce/woocommerce-blocks#7393
* Updated testing zip
* Bumping version strings to new version.
* Empty commit for release pull request
* Fix wrong keys being sent in `canMakePayment` and customer data showing in the Checkout block in the editor (https://github.com/woocommerce/woocommerce-blocks/pull/7434)
* Construct args for canMakePayment with correct keys
* When the CheckoutEventsContext mounts, initialize payment store
* Destructure useSelect correctly
* Dispatch __internalInitializePaymentStore in selector tests
* Update selector name to __internalUpdateAvailablePaymentMethods
* Remove check for editor when registering checkout store
* Add check for when express payment methods have updated too
* Ensure billingAddress key exists in canMakePayment arg
* Use editor context to know if we're in editor
* Updated readme.txt
* Reverted stable tag change on readme.txt
* Testing instructions
* Cleaned out testing instructions
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
Co-authored-by: Tarun Vijwani <tarun.vijwani@automattic.com>
Co-authored-by: Niels Lange <info@nielslange.de>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
Co-authored-by: Tarun Vijwani <tarun.vijwani@automattic.com>
Co-authored-by: Niels Lange <info@nielslange.de>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* Empty commit for release pull request
* Added readme.txt changelog entry
* Update HPOS compatibility snippet (https://github.com/woocommerce/woocommerce-blocks/pull/7395)
* 8.7.2 Testing notes
* Update testing notes
* Update testing notes
* Bumped version
* Refactor force billing: remove forcedBillingAddress from conditions for showBillingFields (https://github.com/woocommerce/woocommerce-blocks/pull/7393)
Co-authored-by: Niels Lange <info@nielslange.de>
* Updated testing instructions and changelog to include woocommerce/woocommerce-blocks#7393
* Updated testing zip
* Bumping version strings to new version.
* Empty commit for release pull request
* Fix wrong keys being sent in `canMakePayment` and customer data showing in the Checkout block in the editor (https://github.com/woocommerce/woocommerce-blocks/pull/7434)
* Construct args for canMakePayment with correct keys
* When the CheckoutEventsContext mounts, initialize payment store
* Destructure useSelect correctly
* Dispatch __internalInitializePaymentStore in selector tests
* Update selector name to __internalUpdateAvailablePaymentMethods
* Remove check for editor when registering checkout store
* Add check for when express payment methods have updated too
* Ensure billingAddress key exists in canMakePayment arg
* Use editor context to know if we're in editor
* Updated readme.txt
* Reverted stable tag change on readme.txt
* Testing instructions
* Cleaned out testing instructions
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
Co-authored-by: Tarun Vijwani <tarun.vijwani@automattic.com>
Co-authored-by: Niels Lange <info@nielslange.de>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* Empty commit for release pull request
* Updated changelog.
* Minor lint fix.
* 8.7.0 Testing instructions
* Updated and tidy docs/internal-developers/testing/releases/README.md
* Add filter-link-button mixin (https://github.com/woocommerce/woocommerce-blocks/pull/7357)
* Set default style to link-button mixin
It was identified that we currently have 3 different behaviors for links used in the application. In issue woocommerce/woocommerce-blocks#1778, it was discussed a set of good practices that we should follow in order to obtain consistency between links.
Currently, the link-button mixin is already used by the 'Clear all' button in the Active Filters block, so the idea was to increment it with a common pattern (font size small, font-weight normal, underlined by default and not underlined when on hover) that can be reused by other components (for example FilterResetButton).
* Change link-button mixin to make it attend the expected default style for links
* Replace text-button with link-button mixin in FilterResetButton component
* Add new mixin for links in filter blocks
* Revert change to link-button mixin to prevent it to affect link buttons on Checkout page
* Add filter-link-button mixin that can be used in filter blocks
* Remove link-button styles that were moved to filter-link-button mixin
By default, link-button mixin styles should have only styles from the text-button mixin and also be underlined.
The styles for link button in filter blocks should reside in filter-link-button mixin.
* Cherry picked Add filter-link-button mixin woocommerce/woocommerce-blocks#7357 and updated testing instructions
* Re-added woocommerce/woocommerce-blocks#7273 to changelog
* Correct block name and description (https://github.com/woocommerce/woocommerce-blocks/pull/7354)
* Correct block name and description
* remove duplicated description for controls blocks
* remove duplicated title and desc
* Revert "remove duplicated description for controls blocks"
This reverts commit ed5417eb0e5191ed2f1def2a04c9e724fe70856a.
* removed woocommerce/woocommerce-blocks#7338 from testing instructions and changelog
* Updated testing zip package.
* Minor formatting fix on the release instructions
* change any to or below the express payment method on cart (https://github.com/woocommerce/woocommerce-blocks/pull/7369)
* Updated zip.
* Add temporary workaround to fix inserting Cart block in WordPress.com (https://github.com/woocommerce/woocommerce-blocks/pull/7367)
* remove problematic actions as deps
* add inline docs
* add todo comment
* Cherry picked: Fix a problem that causes an infinite loop when inserting Cart block in wordpress.com (7367)
* Updated testing zip.
* Bumping version strings to new version.
* Empty commit for release pull request
* Release: 8.7.1 (https://github.com/woocommerce/woocommerce-blocks/pull/7371)
* Empty commit for release pull request
* Updated changelog.
* Minor lint fix.
* 8.7.0 Testing instructions
* Updated and tidy docs/internal-developers/testing/releases/README.md
* Add filter-link-button mixin (https://github.com/woocommerce/woocommerce-blocks/pull/7357)
* Set default style to link-button mixin
It was identified that we currently have 3 different behaviors for links used in the application. In issue woocommerce/woocommerce-blocks#1778, it was discussed a set of good practices that we should follow in order to obtain consistency between links.
Currently, the link-button mixin is already used by the 'Clear all' button in the Active Filters block, so the idea was to increment it with a common pattern (font size small, font-weight normal, underlined by default and not underlined when on hover) that can be reused by other components (for example FilterResetButton).
* Change link-button mixin to make it attend the expected default style for links
* Replace text-button with link-button mixin in FilterResetButton component
* Add new mixin for links in filter blocks
* Revert change to link-button mixin to prevent it to affect link buttons on Checkout page
* Add filter-link-button mixin that can be used in filter blocks
* Remove link-button styles that were moved to filter-link-button mixin
By default, link-button mixin styles should have only styles from the text-button mixin and also be underlined.
The styles for link button in filter blocks should reside in filter-link-button mixin.
* Cherry picked Add filter-link-button mixin woocommerce/woocommerce-blocks#7357 and updated testing instructions
* Re-added woocommerce/woocommerce-blocks#7273 to changelog
* Correct block name and description (https://github.com/woocommerce/woocommerce-blocks/pull/7354)
* Correct block name and description
* remove duplicated description for controls blocks
* remove duplicated title and desc
* Revert "remove duplicated description for controls blocks"
This reverts commit ed5417eb0e5191ed2f1def2a04c9e724fe70856a.
* removed woocommerce/woocommerce-blocks#7338 from testing instructions and changelog
* Updated testing zip package.
* Minor formatting fix on the release instructions
* change any to or below the express payment method on cart (https://github.com/woocommerce/woocommerce-blocks/pull/7369)
* Updated zip.
* Add temporary workaround to fix inserting Cart block in WordPress.com (https://github.com/woocommerce/woocommerce-blocks/pull/7367)
* remove problematic actions as deps
* add inline docs
* add todo comment
* Cherry picked: Fix a problem that causes an infinite loop when inserting Cart block in wordpress.com (7367)
* Updated testing zip.
* Bumping version strings to new version.
* Empty commit for release pull request
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
Co-authored-by: Alexandre Lara <allexandrelara@gmail.com>
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
* Release: 8.7.2 (https://github.com/woocommerce/woocommerce-blocks/pull/7396)
* Empty commit for release pull request
* Added readme.txt changelog entry
* Update HPOS compatibility snippet (https://github.com/woocommerce/woocommerce-blocks/pull/7395)
* 8.7.2 Testing notes
* Update testing notes
* Update testing notes
* Bumped version
* Refactor force billing: remove forcedBillingAddress from conditions for showBillingFields (https://github.com/woocommerce/woocommerce-blocks/pull/7393)
Co-authored-by: Niels Lange <info@nielslange.de>
* Updated testing instructions and changelog to include woocommerce/woocommerce-blocks#7393
* Updated testing zip
* Bumping version strings to new version.
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
Co-authored-by: Tarun Vijwani <tarun.vijwani@automattic.com>
Co-authored-by: Niels Lange <info@nielslange.de>
* README.md formatting
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Alexandre Lara <allexandrelara@gmail.com>
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Tarun Vijwani <tarun.vijwani@automattic.com>
Co-authored-by: Niels Lange <info@nielslange.de>
* Products by Rating: Move the Filter by Ratings block to the feature plugin build
* Products by Rating: Update the internal doc
* Products by Rating: Include a Feature Plugin check before loading the Rating filter variation
* Add overview to payment data store docs
* Add documentation for isExpressPaymentMethodActive
* Add documentation for getActiveSavedToken
* Remove _ from Example heading
* Add documentation for getActivePaymentMethod
* Add documentation for getAvailablePaymentMethods
* Add documentation for getAvailableExpressPaymentMethods
* Add documentation for getPaymentMethodData
* Add documentation for getSavedPaymentMethods
* Add documentation for getActiveSavedPaymentMethods
* Add documentation for shouldSavePaymentMethod
* Add documentation for getCurrentStatus
* Change docs for shouldSavePaymentMethod to getShouldSavePaymentMethod
* Add documentation for normal/express paymentMethodsInitialized
* Add table of contents for payment method documentation
* Empty commit for release pull request
* Updated changelog.
* Minor lint fix.
* 8.7.0 Testing instructions
* Updated and tidy docs/internal-developers/testing/releases/README.md
* Add filter-link-button mixin (https://github.com/woocommerce/woocommerce-blocks/pull/7357)
* Set default style to link-button mixin
It was identified that we currently have 3 different behaviors for links used in the application. In issue woocommerce/woocommerce-blocks#1778, it was discussed a set of good practices that we should follow in order to obtain consistency between links.
Currently, the link-button mixin is already used by the 'Clear all' button in the Active Filters block, so the idea was to increment it with a common pattern (font size small, font-weight normal, underlined by default and not underlined when on hover) that can be reused by other components (for example FilterResetButton).
* Change link-button mixin to make it attend the expected default style for links
* Replace text-button with link-button mixin in FilterResetButton component
* Add new mixin for links in filter blocks
* Revert change to link-button mixin to prevent it to affect link buttons on Checkout page
* Add filter-link-button mixin that can be used in filter blocks
* Remove link-button styles that were moved to filter-link-button mixin
By default, link-button mixin styles should have only styles from the text-button mixin and also be underlined.
The styles for link button in filter blocks should reside in filter-link-button mixin.
* Cherry picked Add filter-link-button mixin woocommerce/woocommerce-blocks#7357 and updated testing instructions
* Re-added woocommerce/woocommerce-blocks#7273 to changelog
* Correct block name and description (https://github.com/woocommerce/woocommerce-blocks/pull/7354)
* Correct block name and description
* remove duplicated description for controls blocks
* remove duplicated title and desc
* Revert "remove duplicated description for controls blocks"
This reverts commit ed5417eb0e5191ed2f1def2a04c9e724fe70856a.
* removed woocommerce/woocommerce-blocks#7338 from testing instructions and changelog
* Updated testing zip package.
* Minor formatting fix on the release instructions
* change any to or below the express payment method on cart (https://github.com/woocommerce/woocommerce-blocks/pull/7369)
* Updated zip.
* Add temporary workaround to fix inserting Cart block in WordPress.com (https://github.com/woocommerce/woocommerce-blocks/pull/7367)
* remove problematic actions as deps
* add inline docs
* add todo comment
* Cherry picked: Fix a problem that causes an infinite loop when inserting Cart block in wordpress.com (7367)
* Updated testing zip.
* Bumping version strings to new version.
* Empty commit for release pull request
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
Co-authored-by: Alexandre Lara <allexandrelara@gmail.com>
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
* Empty commit for release pull request
* Updated changelog.
* Minor lint fix.
* 8.7.0 Testing instructions
* Updated and tidy docs/internal-developers/testing/releases/README.md
* Add filter-link-button mixin (https://github.com/woocommerce/woocommerce-blocks/pull/7357)
* Set default style to link-button mixin
It was identified that we currently have 3 different behaviors for links used in the application. In issue woocommerce/woocommerce-blocks#1778, it was discussed a set of good practices that we should follow in order to obtain consistency between links.
Currently, the link-button mixin is already used by the 'Clear all' button in the Active Filters block, so the idea was to increment it with a common pattern (font size small, font-weight normal, underlined by default and not underlined when on hover) that can be reused by other components (for example FilterResetButton).
* Change link-button mixin to make it attend the expected default style for links
* Replace text-button with link-button mixin in FilterResetButton component
* Add new mixin for links in filter blocks
* Revert change to link-button mixin to prevent it to affect link buttons on Checkout page
* Add filter-link-button mixin that can be used in filter blocks
* Remove link-button styles that were moved to filter-link-button mixin
By default, link-button mixin styles should have only styles from the text-button mixin and also be underlined.
The styles for link button in filter blocks should reside in filter-link-button mixin.
* Cherry picked Add filter-link-button mixin woocommerce/woocommerce-blocks#7357 and updated testing instructions
* Re-added woocommerce/woocommerce-blocks#7273 to changelog
* Correct block name and description (https://github.com/woocommerce/woocommerce-blocks/pull/7354)
* Correct block name and description
* remove duplicated description for controls blocks
* remove duplicated title and desc
* Revert "remove duplicated description for controls blocks"
This reverts commit ed5417eb0e5191ed2f1def2a04c9e724fe70856a.
* removed woocommerce/woocommerce-blocks#7338 from testing instructions and changelog
* Updated testing zip package.
* Minor formatting fix on the release instructions
* change any to or below the express payment method on cart (https://github.com/woocommerce/woocommerce-blocks/pull/7369)
* Updated zip.
* Add temporary workaround to fix inserting Cart block in WordPress.com (https://github.com/woocommerce/woocommerce-blocks/pull/7367)
* remove problematic actions as deps
* add inline docs
* add todo comment
* Cherry picked: Fix a problem that causes an infinite loop when inserting Cart block in wordpress.com (7367)
* Updated testing zip.
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
Co-authored-by: Alexandre Lara <allexandrelara@gmail.com>
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
* Add documentation for validation data store
Co-authored-by: Niels Lange <info@nielslange.de>
* Use correct file path for validation data store docs
* Fix typo in hasValidationErrors documentation
* Add parameters and example of getValidationError
* Improve description of getValidationErrorId
* Fix typo in hasValidationErrors
* Document clearValidationErrors
* Add documentation and example for setValidationErrors
* Add documentation for clearAllValidationErrors
* Add documentation for hideValidationError
* Add documentation for showValidationError
* Add overview section
* Update hideValidationError documentation
* Add showValidationErrors documentation
* Update table of contents
* Fix typo in action name and add example
* Fix typo in hasValidationErrors
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
* Rename payment-method-data-context to payment-event-context and tidy up types and things
* Rename uses of PAYMENT_METHOD_DATA_STORE_KEY to PAYMENT_STORE_KEY
* Rename __internalInitializePaymentMethodDataStore and unsubscribeInitializePaymentMethodDataStore
* Rename unsubscribeInitializePaymentMethodDataStore
* Rename setProcessingResponse to setPaymentResult and remove setOrderId from the checkout data store actions
* Fix accidentally changing data exposed to the observers
* Rename all checkout actions with the __internal prefix
* Prefix all payment method data store actions with __internal
* Pedantic spacing
* Fix ts error
* Add showRemoveItemLink filter
This is a filter that will allow developers to set whether the link to remove a cartItem is visible
* Add test for showRemoveItemLink filter
* Remove unnecessary quantity override
* Move definition of cart to avoid hardcoding id value in filter
* Updated documentation for `showRemoveItemLink` filter
* available-filters.md tweak
* available-filters.md tweak
* Add example to filters for showRemoveItemLink
* Remove whitespace
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
Co-authored-by: Niels Lange <info@nielslange.de>
* Remove setPristine as it's not used
* Comment checkout actions
* Rename setProcessingResponse to setPaymentResult and remove setOrderId from the checkout data store actions
* Add comments to payment actions
* Update documentation with data stores
* Fix accidentally changing data exposed to the observers
* Document missing parameters for actions
* WIP add filter for place order button label
* Solve TS issue
* Add display priority
* Refactor display priority
* WIP Implement useMemo()
* Try using a global cache
* Add docs for placeOrderLabel filter
* Update docs/third-party-developers/extensibility/checkout-block/available-filters.md
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* Adjust docs
* Rename “placeOrderLabel” to “placeOrderButtonLabel”
* Update assets/js/types/type-defs/payments.ts
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
Co-authored-by: Lucio Giannotta <lucio.giannotta@a8c.com>
* Mock getCartTotals
* Change test to use data store instead of context
* Move payment method context test to data store selectors
* Change description of test suite
* Bump commit to trigger tests
* Fix path in test
* update package lock
* Set correct state payment method reducer tests/use correct actions
* Get saved payment methods from store not context
* Mock stores and update tests to allow switching payment methods
* Update tests to get onSubmit from checkoutEventsContext
* Remove cartTotalsLoaded check from payment method initialize check
* Make PaymentMethods test wait until payments initialized
* initialize payment method data store when cart is loaded
* Remove unneeded actions and add initializePaymentMethodDataStore
* Remove check for cart totals loaded in checkPaymentMethods
* Remove updateAvilablePaymentMethods from registry
* Remove unneeded mock
* Remove unused import
* Rename imports to fix eslint errors
* Remove unused imports
* Remove return false from checkPaymentMethods
* Remove unnecessary setPaymentMethodsInitialized call
* Add todo comment to track refactoring opportunity
* Remove savedpayment methods from payment method context and rename it
* Rename payment method data context to payment method events context
* Add tests for setDefaultPaymentMethods
* Optimize the availablePaymentMethods state data
Store only the "name" attribute for now.
* Get list of payment methods from the registry instead of the store
We are using this hook to get some React elements in the payment method
object. So, we are getting the raw data directly from the registry instead
of the store.
* Fix payment state not loading on the Checkout edit page
* Handle checkout edit page case
* Fix infinite loop error on C&C Blocks
* Include @wordpress/redux-routine in transformIgnorePatterns jest config
Co-authored-by: Saad Tarhi <saad.trh@gmail.com>
* Move paymentMethodDataProvider into a data store (https://github.com/woocommerce/woocommerce-blocks/pull/6208)
* Fix typographical error on LegacyRegisterExpressPaymentMethodFunction type
* Add default state for PaymentMethod data store
* Add preliminary action types
* Add preliminary action dispatchers
* Create payment method data store
* Add preliminary reducers for payment method data store
* Add preliminary selectors for payment method data store
* Add reducers/actions for registering payment methods
* Export payment method data store key
* Add test for payment method data reducers
* Add shouldSavePaymentMethod selector
* Add store key as constant
* Add more action types for registering and initializing payment methods
* Get active payment method from data store instead of from context
* Add registered methods to default state of payment method data store
* Dispatch name of registered payment method to payment method data store
* Remove setShouldSavePayment from payment method dispatcher and types
* Get payment methods from registry instead of payment context
* Add available payment methods to store
* Add function to check whether payment methods are allowed to be used
* Add selector to check if payments are initialised
* Remove resolvers and add controls to payment method data store
* Change type of payment requirements to string[]
* Turn addRegistered and addRegisteredExpress into generators
This is so we can check each payment method's validity before adding it to the list of available payment methods
* Add action type for setting express payments as initialized
* Only select from available methods in payment method options
* Remove argument from addRegisteredPaymentMethod in payment method registry
* Rename folder and store name to not contain the word data
* Add selectors for express payment methods and their initialisation
* Delete controls again in favour of thunks
* Rename payment-method-data to payment-methdods
* Create new setDefaultPaymentMethod function
This will set the payment method when the cart loads.
* Add CustomerPaymentMethodConfiguration type
* Make getAvailableExpressPaymentMethods return correct data
* Check express methods and normal methods when cart changes
* Add action for setting active express payment methods
* Handle express methods in checkPaymentMethodCanPay
* Hide express payments area if none are available
* Add selector for paymentMethodData
* Add customer data to default state and add selector for it
* Add setPaymentStatus action and reducer case
* Set the default payment method when one isn't selected
* Correct types on getCustomerPaymentMethods
* Set status in data store alongside context status
* Comment out active gateway selection - remove later
* Set status in express payment methods in data store
* Use correct key in payment method data context
* Directly check payment methods from the list in blocks-registry
* Add semicolon to import statement
* Fix payment method data state call
* Get paymentMethodData from store not context
* Fix linting issues
Co-authored-by: Saad Tarhi <saad.trh@gmail.com>
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
* Rebase on the update/checkout-data-store branch & Fix failed payments (https://github.com/woocommerce/woocommerce-blocks/pull/6587)
* Add checkout data store
* wip on checkout data store
* CheckoutContext now uses the checkout store
* Investigated and removed setting the redirectUrl on the default state
* update extension and address hooks to use checkout data store
* use checkout data store in checkout-processor and use-checkout-button
* trim useCheckoutContext from use-payment-method-interface && use-store-cart-item-quantity
* Remove useCheckoutContext from shipping provider
* Remove isCalculating from state
* Removed useCheckoutContext from lots of places
* Remove useCheckoutContext from checkout-payment-block
* Remove useCheckoutContext in checkout-shipping-methods-block and checkout-shipping-address-block
* add isCart selector and action and update the checkoutstate context
* Fixed redirectUrl bug by using thunks
* Remove dispatchActions from checkout-state
* Change SET_HAS_ERROR action to be neater
* Thomas' feedback
* Tidy up
* Oops, deleted things I shouldn't have
* Typescript
* Fix types
* Fix tests
* Remove isCart
* Update docs and remove unecessary getRedirectUrl() selector
* set correct type for preloadedCheckoutData
* Remove duplicate Address type
* Fix missing addresses from type-defs index
* Update docs/block-client-apis/checkout/checkout-api.md
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* Update docs/block-client-apis/checkout/checkout-api.md
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* Update docs
* Update docs/block-client-apis/checkout/checkout-api.md
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* Update docs/block-client-apis/checkout/checkout-api.md
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* Revert feedback changes
* REvert feedback formatting
* Update docs formatting
* Fix typographical error on LegacyRegisterExpressPaymentMethodFunction type
* Add default state for PaymentMethod data store
* Add preliminary action types
* Add preliminary action dispatchers
* Create payment method data store
* Add preliminary reducers for payment method data store
* Add preliminary selectors for payment method data store
* Add reducers/actions for registering payment methods
* Export payment method data store key
* Add test for payment method data reducers
* Add shouldSavePaymentMethod selector
* Add store key as constant
* Add more action types for registering and initializing payment methods
* Get active payment method from data store instead of from context
* Add registered methods to default state of payment method data store
* Dispatch name of registered payment method to payment method data store
* Remove setShouldSavePayment from payment method dispatcher and types
* Get payment methods from registry instead of payment context
* Add available payment methods to store
* Add function to check whether payment methods are allowed to be used
* Add selector to check if payments are initialised
* Remove resolvers and add controls to payment method data store
* Change type of payment requirements to string[]
* Turn addRegistered and addRegisteredExpress into generators
This is so we can check each payment method's validity before adding it to the list of available payment methods
* Add action type for setting express payments as initialized
* Only select from available methods in payment method options
* Remove argument from addRegisteredPaymentMethod in payment method registry
* Rename folder and store name to not contain the word data
* Add selectors for express payment methods and their initialisation
* Delete controls again in favour of thunks
* Rename payment-method-data to payment-methdods
* Create new setDefaultPaymentMethod function
This will set the payment method when the cart loads.
* Add CustomerPaymentMethodConfiguration type
* Make getAvailableExpressPaymentMethods return correct data
* Check express methods and normal methods when cart changes
* Add action for setting active express payment methods
* Handle express methods in checkPaymentMethodCanPay
* Hide express payments area if none are available
* Add selector for paymentMethodData
* Add customer data to default state and add selector for it
* Add setPaymentStatus action and reducer case
* Set the default payment method when one isn't selected
* Correct types on getCustomerPaymentMethods
* Set status in data store alongside context status
* Comment out active gateway selection - remove later
* Set status in express payment methods in data store
* Directly check payment methods from the list in blocks-registry
* Add semicolon to import statement
* Fix payment method data state call
* Get paymentMethodData from store not context
* Add addPaymentMethodData action/reducer case
* Update payment method on payment success
* Add 'getCurrentStatus' selector
* Remove the temporary solution
For getting payment method data into the data store
* Prevent the 'success' context action from being dispatched
* Update the "setPaymentStatus" data store action
Accept status as an object instead of string
* Fix the "currentStatus" reducer state update value
* Get payment data into data store
* Set the correct payment status to data store
* Get the success status of payment from data store
* Use store data in the payment dispatchers
Replace the React useReducers action in the payment dispatchers file with
the payment method data store
* Get payment status from data store
* Use data store for the payment error status
* Use payment data store failed status
* Use payment data store for the isFinished status
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
* Fix merge conflict error
* Set & get the provider's state from our data store instead of React's useReducer (https://github.com/woocommerce/woocommerce-blocks/pull/6588)
* Add checkout data store
* wip on checkout data store
* CheckoutContext now uses the checkout store
* Investigated and removed setting the redirectUrl on the default state
* update extension and address hooks to use checkout data store
* use checkout data store in checkout-processor and use-checkout-button
* trim useCheckoutContext from use-payment-method-interface && use-store-cart-item-quantity
* Remove useCheckoutContext from shipping provider
* Remove isCalculating from state
* Removed useCheckoutContext from lots of places
* Remove useCheckoutContext from checkout-payment-block
* Remove useCheckoutContext in checkout-shipping-methods-block and checkout-shipping-address-block
* add isCart selector and action and update the checkoutstate context
* Fixed redirectUrl bug by using thunks
* Remove dispatchActions from checkout-state
* Change SET_HAS_ERROR action to be neater
* Thomas' feedback
* Tidy up
* Oops, deleted things I shouldn't have
* Typescript
* Fix types
* Fix tests
* Remove isCart
* Update docs and remove unecessary getRedirectUrl() selector
* set correct type for preloadedCheckoutData
* Remove duplicate Address type
* Fix missing addresses from type-defs index
* Update docs/block-client-apis/checkout/checkout-api.md
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* Update docs/block-client-apis/checkout/checkout-api.md
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* Update docs
* Update docs/block-client-apis/checkout/checkout-api.md
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* Update docs/block-client-apis/checkout/checkout-api.md
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* Revert feedback changes
* REvert feedback formatting
* Update docs formatting
* Fix typographical error on LegacyRegisterExpressPaymentMethodFunction type
* Add default state for PaymentMethod data store
* Add preliminary action types
* Add preliminary action dispatchers
* Create payment method data store
* Add preliminary reducers for payment method data store
* Add preliminary selectors for payment method data store
* Add reducers/actions for registering payment methods
* Export payment method data store key
* Add test for payment method data reducers
* Add shouldSavePaymentMethod selector
* Add store key as constant
* Add more action types for registering and initializing payment methods
* Get active payment method from data store instead of from context
* Add registered methods to default state of payment method data store
* Dispatch name of registered payment method to payment method data store
* Remove setShouldSavePayment from payment method dispatcher and types
* Get payment methods from registry instead of payment context
* Add available payment methods to store
* Add function to check whether payment methods are allowed to be used
* Add selector to check if payments are initialised
* Remove resolvers and add controls to payment method data store
* Change type of payment requirements to string[]
* Turn addRegistered and addRegisteredExpress into generators
This is so we can check each payment method's validity before adding it to the list of available payment methods
* Add action type for setting express payments as initialized
* Only select from available methods in payment method options
* Remove argument from addRegisteredPaymentMethod in payment method registry
* Rename folder and store name to not contain the word data
* Add selectors for express payment methods and their initialisation
* Delete controls again in favour of thunks
* Rename payment-method-data to payment-methdods
* Create new setDefaultPaymentMethod function
This will set the payment method when the cart loads.
* Add CustomerPaymentMethodConfiguration type
* Make getAvailableExpressPaymentMethods return correct data
* Check express methods and normal methods when cart changes
* Add action for setting active express payment methods
* Handle express methods in checkPaymentMethodCanPay
* Hide express payments area if none are available
* Add selector for paymentMethodData
* Add customer data to default state and add selector for it
* Add setPaymentStatus action and reducer case
* Set the default payment method when one isn't selected
* Correct types on getCustomerPaymentMethods
* Set status in data store alongside context status
* Comment out active gateway selection - remove later
* Set status in express payment methods in data store
* Directly check payment methods from the list in blocks-registry
* Add semicolon to import statement
* Fix payment method data state call
* Get paymentMethodData from store not context
* Add addPaymentMethodData action/reducer case
* Update payment method on payment success
* Add 'getCurrentStatus' selector
* Remove the temporary solution
For getting payment method data into the data store
* Prevent the 'success' context action from being dispatched
* Update the "setPaymentStatus" data store action
Accept status as an object instead of string
* Fix the "currentStatus" reducer state update value
* Get payment data into data store
* Set the correct payment status to data store
* Get the success status of payment from data store
* Use store data in the payment dispatchers
Replace the React useReducers action in the payment dispatchers file with
the payment method data store
* Get payment status from data store
* Use data store for the payment error status
* Use payment data store failed status
* Use payment data store for the isFinished status
* Update the setPaymentStatus argument
* Set up setRegisteredPaymentMethods in data store
* Use the data store version of the registeredPaymentMethods
* Fix the default state type of the registeredPaymentMethods
* Set up setRegisteredExpressPaymentMethod in data store
* Use the data version of the registred express payment methods
* Set the correct action type for removing payment methods
* Fix default state express payment methods type
* Use the store data version of activePaymentMethod
* Use setActivePaymentMethod in the dispatchers file
And refactor code
* Update payment status arguments for express payment methods
* Use paymentMethodData from the data store
* Use payment method's errorMessage from data store
* Update paymentMethods list in data store reducer
* Replace remaining payment context data with data store
* Clean up payment method context file
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
* Get payment method data directly from the data store instead of the usePaymentMethodDataContext hook (https://github.com/woocommerce/woocommerce-blocks/pull/6589)
* Add checkout data store
* wip on checkout data store
* CheckoutContext now uses the checkout store
* Investigated and removed setting the redirectUrl on the default state
* update extension and address hooks to use checkout data store
* use checkout data store in checkout-processor and use-checkout-button
* trim useCheckoutContext from use-payment-method-interface && use-store-cart-item-quantity
* Remove useCheckoutContext from shipping provider
* Remove isCalculating from state
* Removed useCheckoutContext from lots of places
* Remove useCheckoutContext from checkout-payment-block
* Remove useCheckoutContext in checkout-shipping-methods-block and checkout-shipping-address-block
* add isCart selector and action and update the checkoutstate context
* Fixed redirectUrl bug by using thunks
* Remove dispatchActions from checkout-state
* Change SET_HAS_ERROR action to be neater
* Thomas' feedback
* Tidy up
* Oops, deleted things I shouldn't have
* Typescript
* Fix types
* Fix tests
* Remove isCart
* Update docs and remove unecessary getRedirectUrl() selector
* set correct type for preloadedCheckoutData
* Remove duplicate Address type
* Fix missing addresses from type-defs index
* Update docs/block-client-apis/checkout/checkout-api.md
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* Update docs/block-client-apis/checkout/checkout-api.md
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* Update docs
* Update docs/block-client-apis/checkout/checkout-api.md
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* Update docs/block-client-apis/checkout/checkout-api.md
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* Revert feedback changes
* REvert feedback formatting
* Update docs formatting
* Fix typographical error on LegacyRegisterExpressPaymentMethodFunction type
* Add default state for PaymentMethod data store
* Add preliminary action types
* Add preliminary action dispatchers
* Create payment method data store
* Add preliminary reducers for payment method data store
* Add preliminary selectors for payment method data store
* Add reducers/actions for registering payment methods
* Export payment method data store key
* Add test for payment method data reducers
* Add shouldSavePaymentMethod selector
* Add store key as constant
* Add more action types for registering and initializing payment methods
* Get active payment method from data store instead of from context
* Add registered methods to default state of payment method data store
* Dispatch name of registered payment method to payment method data store
* Remove setShouldSavePayment from payment method dispatcher and types
* Get payment methods from registry instead of payment context
* Add available payment methods to store
* Add function to check whether payment methods are allowed to be used
* Add selector to check if payments are initialised
* Remove resolvers and add controls to payment method data store
* Change type of payment requirements to string[]
* Turn addRegistered and addRegisteredExpress into generators
This is so we can check each payment method's validity before adding it to the list of available payment methods
* Add action type for setting express payments as initialized
* Only select from available methods in payment method options
* Remove argument from addRegisteredPaymentMethod in payment method registry
* Rename folder and store name to not contain the word data
* Add selectors for express payment methods and their initialisation
* Delete controls again in favour of thunks
* Rename payment-method-data to payment-methdods
* Create new setDefaultPaymentMethod function
This will set the payment method when the cart loads.
* Add CustomerPaymentMethodConfiguration type
* Make getAvailableExpressPaymentMethods return correct data
* Check express methods and normal methods when cart changes
* Add action for setting active express payment methods
* Handle express methods in checkPaymentMethodCanPay
* Hide express payments area if none are available
* Add selector for paymentMethodData
* Add customer data to default state and add selector for it
* Add setPaymentStatus action and reducer case
* Set the default payment method when one isn't selected
* Correct types on getCustomerPaymentMethods
* Set status in data store alongside context status
* Comment out active gateway selection - remove later
* Set status in express payment methods in data store
* Directly check payment methods from the list in blocks-registry
* Add semicolon to import statement
* Fix payment method data state call
* Get paymentMethodData from store not context
* Add addPaymentMethodData action/reducer case
* Update payment method on payment success
* Add 'getCurrentStatus' selector
* Remove the temporary solution
For getting payment method data into the data store
* Prevent the 'success' context action from being dispatched
* Update the "setPaymentStatus" data store action
Accept status as an object instead of string
* Fix the "currentStatus" reducer state update value
* Get payment data into data store
* Set the correct payment status to data store
* Get the success status of payment from data store
* Use store data in the payment dispatchers
Replace the React useReducers action in the payment dispatchers file with
the payment method data store
* Get payment status from data store
* Use data store for the payment error status
* Use payment data store failed status
* Use payment data store for the isFinished status
* Update the setPaymentStatus argument
* Set up setRegisteredPaymentMethods in data store
* Use the data store version of the registeredPaymentMethods
* Fix the default state type of the registeredPaymentMethods
* Set up setRegisteredExpressPaymentMethod in data store
* Use the data version of the registred express payment methods
* Set the correct action type for removing payment methods
* Fix default state express payment methods type
* Use the store data version of activePaymentMethod
* Use setActivePaymentMethod in the dispatchers file
And refactor code
* Update payment status arguments for express payment methods
* Use paymentMethodData from the data store
* Use payment method's errorMessage from data store
* Update paymentMethods list in data store reducer
* Replace remaining payment context data with data store
* Clean up payment method context file
* Get payment method state from data store in the checkout submit hook
* Copy types.ts file into the payment data store folder
* Fix isExpressPaymentMethodActive selector
* Move the entire currentStatus into the data store
* Replace the payment context state with the data store
* Fix getActiveSavedToken & clean up the context file
* Use the accutrate name of the "createErrorNotice"
* Update the payment method data store key import
* Diable unused state from the context
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
* Refactor the payment method data store & context (https://github.com/woocommerce/woocommerce-blocks/pull/6607)
* Add checkout data store
* wip on checkout data store
* CheckoutContext now uses the checkout store
* Investigated and removed setting the redirectUrl on the default state
* update extension and address hooks to use checkout data store
* use checkout data store in checkout-processor and use-checkout-button
* trim useCheckoutContext from use-payment-method-interface && use-store-cart-item-quantity
* Remove useCheckoutContext from shipping provider
* Remove isCalculating from state
* Removed useCheckoutContext from lots of places
* Remove useCheckoutContext from checkout-payment-block
* Remove useCheckoutContext in checkout-shipping-methods-block and checkout-shipping-address-block
* add isCart selector and action and update the checkoutstate context
* Fixed redirectUrl bug by using thunks
* Remove dispatchActions from checkout-state
* Change SET_HAS_ERROR action to be neater
* Thomas' feedback
* Tidy up
* Oops, deleted things I shouldn't have
* Typescript
* Fix types
* Fix tests
* Remove isCart
* Update docs and remove unecessary getRedirectUrl() selector
* set correct type for preloadedCheckoutData
* Remove duplicate Address type
* Fix missing addresses from type-defs index
* Update docs/block-client-apis/checkout/checkout-api.md
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* Update docs/block-client-apis/checkout/checkout-api.md
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* Update docs
* Update docs/block-client-apis/checkout/checkout-api.md
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* Update docs/block-client-apis/checkout/checkout-api.md
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* Revert feedback changes
* REvert feedback formatting
* Update docs formatting
* Fix typographical error on LegacyRegisterExpressPaymentMethodFunction type
* Add default state for PaymentMethod data store
* Add preliminary action types
* Add preliminary action dispatchers
* Create payment method data store
* Add preliminary reducers for payment method data store
* Add preliminary selectors for payment method data store
* Add reducers/actions for registering payment methods
* Export payment method data store key
* Add test for payment method data reducers
* Add shouldSavePaymentMethod selector
* Add store key as constant
* Add more action types for registering and initializing payment methods
* Get active payment method from data store instead of from context
* Add registered methods to default state of payment method data store
* Dispatch name of registered payment method to payment method data store
* Remove setShouldSavePayment from payment method dispatcher and types
* Get payment methods from registry instead of payment context
* Add available payment methods to store
* Add function to check whether payment methods are allowed to be used
* Add selector to check if payments are initialised
* Remove resolvers and add controls to payment method data store
* Change type of payment requirements to string[]
* Turn addRegistered and addRegisteredExpress into generators
This is so we can check each payment method's validity before adding it to the list of available payment methods
* Add action type for setting express payments as initialized
* Only select from available methods in payment method options
* Remove argument from addRegisteredPaymentMethod in payment method registry
* Rename folder and store name to not contain the word data
* Add selectors for express payment methods and their initialisation
* Delete controls again in favour of thunks
* Rename payment-method-data to payment-methdods
* Create new setDefaultPaymentMethod function
This will set the payment method when the cart loads.
* Add CustomerPaymentMethodConfiguration type
* Make getAvailableExpressPaymentMethods return correct data
* Check express methods and normal methods when cart changes
* Add action for setting active express payment methods
* Handle express methods in checkPaymentMethodCanPay
* Hide express payments area if none are available
* Add selector for paymentMethodData
* Add customer data to default state and add selector for it
* Add setPaymentStatus action and reducer case
* Set the default payment method when one isn't selected
* Correct types on getCustomerPaymentMethods
* Set status in data store alongside context status
* Comment out active gateway selection - remove later
* Set status in express payment methods in data store
* Directly check payment methods from the list in blocks-registry
* Add semicolon to import statement
* Fix payment method data state call
* Get paymentMethodData from store not context
* Add addPaymentMethodData action/reducer case
* Update payment method on payment success
* Add 'getCurrentStatus' selector
* Remove the temporary solution
For getting payment method data into the data store
* Prevent the 'success' context action from being dispatched
* Update the "setPaymentStatus" data store action
Accept status as an object instead of string
* Fix the "currentStatus" reducer state update value
* Get payment data into data store
* Set the correct payment status to data store
* Get the success status of payment from data store
* Use store data in the payment dispatchers
Replace the React useReducers action in the payment dispatchers file with
the payment method data store
* Get payment status from data store
* Use data store for the payment error status
* Use payment data store failed status
* Use payment data store for the isFinished status
* Update the setPaymentStatus argument
* Set up setRegisteredPaymentMethods in data store
* Use the data store version of the registeredPaymentMethods
* Fix the default state type of the registeredPaymentMethods
* Set up setRegisteredExpressPaymentMethod in data store
* Use the data version of the registred express payment methods
* Set the correct action type for removing payment methods
* Fix default state express payment methods type
* Use the store data version of activePaymentMethod
* Use setActivePaymentMethod in the dispatchers file
And refactor code
* Update payment status arguments for express payment methods
* Use paymentMethodData from the data store
* Use payment method's errorMessage from data store
* Update paymentMethods list in data store reducer
* Replace remaining payment context data with data store
* Clean up payment method context file
* Get payment method state from data store in the checkout submit hook
* Copy types.ts file into the payment data store folder
* Fix isExpressPaymentMethodActive selector
* Move the entire currentStatus into the data store
* Replace the payment context state with the data store
* Fix getActiveSavedToken & clean up the context file
* Use the accutrate name of the "createErrorNotice"
* Update the payment method data store key import
* Diable unused state from the context
* Get enabled customer payment methods using data store selector
* Remove remaining useReducer action from the dispatchers file
* Update types and remove unused vars
* Remove the payment method dispatchers hook
* Refactor & clean up (remove unused files)
* Remove commented line from payment methods types
* Move event emitter into thunks
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
* Remove checkout-state after merge conflicts
* Fix linting errors
* Move types to types.ts
* Move default states into respective store folders
* Fix types and add comment
* Move setExpressPaymentError to payment-methods store
* fix express payment methods not showing up
* Check if payment method is active from the state
* Add comments
* Remove commented out code in payment method data context
* Display an error in the check-payment-methods directly from data store
* Remove use-emit-response hook and move utils in event-emit/utils.ts
* Use correct action property to remove payment methods
* Fix formatting
* Only try to initialize payment methods when cart is done loading
* Add function to order payment methods from server
* Add payment methods in the correct order
* Prevent adding registered payment methods before cart is ready
* Ensure payment methods get removed from state when deregistered
* Reorder setting default payment methods to add customer methods first
* Get customer methods from store not context
* Remove error from payment-method state and associated selectors
* Remove use-payment-method-registration and update the payment method state to remove the duplicated registeredPaymentMethods
* Remove errorMessage from payment-methods store
* Rename customerPaymentMethods -> savedPaymentMethods
* Order payment methods when validating
* Refactor payment-methods.js
* Fix "Payment methods not set in editor" woocommerce/woocommerce-blocks#6655 bug
We never get to load the payment methods object in the editor mode
because there are no cart totals to load.
* Initialize payment methods when available payments are loaded
* Remove duplicate code
* Fix data store state mutation anti-pattern
A Redux rule is to never mutate the state in a reducer to avoid any unexpected results
* Set availablePaymentMethods to the paymentMethods object
Instead of its keys. We can get the keys using "Object.keys".
* Use the available ordered payment methods
The `getPaymentMethods` & `getExpressPaymentMethods` may include unordored
& unavailable payment methods.
* Get the correct value from the emit event response
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
Co-authored-by: Saad Tarhi <saad.trh@gmail.com>
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
* Add checkout data store
* wip on checkout data store
* CheckoutContext now uses the checkout store
* Investigated and removed setting the redirectUrl on the default state
* update extension and address hooks to use checkout data store
* use checkout data store in checkout-processor and use-checkout-button
* trim useCheckoutContext from use-payment-method-interface && use-store-cart-item-quantity
* Remove useCheckoutContext from shipping provider
* Remove isCalculating from state
* Removed useCheckoutContext from lots of places
* Remove useCheckoutContext from checkout-payment-block
* Remove useCheckoutContext in checkout-shipping-methods-block and checkout-shipping-address-block
* add isCart selector and action and update the checkoutstate context
* Fixed redirectUrl bug by using thunks
* Remove dispatchActions from checkout-state
* Change SET_HAS_ERROR action to be neater
* Thomas' feedback
* Tidy up
* Oops, deleted things I shouldn't have
* Typescript
* Fix types
* Fix tests
* Remove isCart
* Update docs and remove unecessary getRedirectUrl() selector
* validate event emitter button
* Added thunks in a separate file
* Call thunks from checkout-state
* Checkout logic tested and working
* Remove dependency injection as much as poss, tidy up and fix some TS errors
* Fix types in thunks.ts
* Fixed some ts errors
* WIP
* Fixed bug
* Shift side effects from checkout-state to checkout-processor
* Revert "Shift side effects from checkout-state to checkout-processor"
This reverts commit 059533da4eb34f9982f66cd4adacc7b2c24f939f.
* Rename CheckoutState to CheckoutEvents
* Move status check outside the thunk
* remove duplicate EVENTS constant
* remove temp buttons
* Remove console logs
* Augment @wordpress/data package with our new store types
* Add correct type for CheckoutAction
* Remove createErrorNotice arg from runCheckoutAfterProcessingWithErrorObservers
* Remove createErrorNotice from emit event types
* Use type keyword when importing types
* Add correct types for dispatch and select in thunks
* Update wordpress/data types
* Replace store creation with new preferred method
* Set correct action type on reducer
* Remove unnecessary async from thunk
* add CHECKOUT_ prefix to checkout events again
* export EVENTS with eveything else in checkout0-events/event-emit
* Remove duplicate SelectFromMap and TailParameters
* Updated type for paymentStatus
* TODO remove wp/data experimental thunks
* Remove `setCustomerId` from events and `processCheckoutResponseHeaders` (https://github.com/woocommerce/woocommerce-blocks/pull/6586)
* Prevent passing dispatch, instead get actions direct from store
* Get setCustomerId from the store instead of passing it to processCheckoutResponseHeaders
* Revert "Prevent passing dispatch, instead get actions direct from store"
This reverts commit 4479a2ef5599d9c8d99c3629616b3d662210fc08.
* Auto stash before revert of "Prevent passing dispatch, instead get actions direct from store"
* Remove duplicate dispatch
* Fix unit tests
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* Add checkout data store
* wip on checkout data store
* CheckoutContext now uses the checkout store
* Investigated and removed setting the redirectUrl on the default state
* update extension and address hooks to use checkout data store
* use checkout data store in checkout-processor and use-checkout-button
* trim useCheckoutContext from use-payment-method-interface && use-store-cart-item-quantity
* Remove useCheckoutContext from shipping provider
* Remove isCalculating from state
* Removed useCheckoutContext from lots of places
* Remove useCheckoutContext from checkout-payment-block
* Remove useCheckoutContext in checkout-shipping-methods-block and checkout-shipping-address-block
* add isCart selector and action and update the checkoutstate context
* Fixed redirectUrl bug by using thunks
* Remove dispatchActions from checkout-state
* Change SET_HAS_ERROR action to be neater
* Thomas' feedback
* Tidy up
* Oops, deleted things I shouldn't have
* Typescript
* Fix types
* Fix tests
* Remove isCart
* Update docs and remove unecessary getRedirectUrl() selector
* set correct type for preloadedCheckoutData
* Remove duplicate Address type
* Fix missing addresses from type-defs index
* Update docs/block-client-apis/checkout/checkout-api.md
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* Update docs/block-client-apis/checkout/checkout-api.md
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* Update docs
* Update docs/block-client-apis/checkout/checkout-api.md
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* Update docs/block-client-apis/checkout/checkout-api.md
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
* Revert feedback changes
* REvert feedback formatting
* Update docs formatting
* Delete empty types.ts file
* remove merge conflict from docs
* Correct linting in docs
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
Co-authored-by: Daniel W. Robert <danielwrobert@gmail.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Lucio Giannotta <lucio.giannotta@a8c.com>
Co-authored-by: Niels Lange <info@nielslange.de>