woocommerce/plugins/woocommerce-blocks/assets/js/base/components
Darren Ethier 4ad741329b Fix saved payment method selection not working for purchases. (https://github.com/woocommerce/woocommerce-blocks/pull/2425)
* fix arguments

* only set payment status to pristine if it isn’t already successful

* add server side handling for saved tokens

* ensure correct gateway is selected when using saved card:
- reset the active payment method when user selects saved payment method
(card); this ensures that the correct gateway is used when switching
from another gateway to a saved card

* enhance radiocontrol to receive option specific change events.

* implement specific option change events

This commit:

- ensures selecting a saved payment option updates active payment method for the selected option.
- Sets the saved token key for the selected option correctly.

* remove unnecessary php side code

* fix bug with default saved payment option not applying:

When the payment options are initialised, we now call the onChange
handler for the default (`is_default`) option. This triggers payment
success() so checkout succeeds with default payment method, even if user
doesn't touch payment options.

* fix effect dependencies

Co-authored-by: Rua Haszard <rua.haszard@automattic.com>
2020-05-11 09:29:57 -04:00
..
block-error-boundary Handle errors when loading payment methods (https://github.com/woocommerce/woocommerce-blocks/pull/2228) 2020-04-15 17:15:56 +02:00
cart-checkout SCSS mixins cleanup (https://github.com/woocommerce/woocommerce-blocks/pull/2405) 2020-05-07 10:48:38 +02:00
checkbox-control CheckboxControl: stop using Gutenberg's CheckboxControl (https://github.com/woocommerce/woocommerce-blocks/pull/2137) 2020-04-07 16:37:03 +01:00
checkbox-list fix translation quantities (https://github.com/woocommerce/woocommerce-blocks/pull/1415) 2019-12-19 10:22:53 +01:00
chip Update snapshot to fix broken tests 2020-02-27 11:53:12 +00:00
country-input Hook up checkout validation with context (https://github.com/woocommerce/woocommerce-blocks/pull/2033) 2020-04-02 11:27:54 +02:00
dropdown-selector All Products & filters accessibility improvements (https://github.com/woocommerce/woocommerce-blocks/pull/1656) 2020-01-30 11:04:39 +01:00
filter-submit-button All Products & filters accessibility improvements (https://github.com/woocommerce/woocommerce-blocks/pull/1656) 2020-01-30 11:04:39 +01:00
formatted-monetary-amount Rename the discount section when discount total is zero (https://github.com/woocommerce/woocommerce-blocks/pull/2367) 2020-05-01 10:59:27 +01:00
label Add 'Go' button to Attribute Filter (https://github.com/woocommerce/woocommerce-blocks/pull/1332) 2019-12-06 16:36:55 +01:00
load-more-button Update dependencies order (https://github.com/woocommerce/woocommerce-blocks/pull/1146) 2019-11-08 17:30:11 +01:00
loading-mask Add isLoading property (https://github.com/woocommerce/woocommerce-blocks/pull/1788) 2020-02-21 14:08:57 +00:00
pagination All Products & filters accessibility improvements (https://github.com/woocommerce/woocommerce-blocks/pull/1656) 2020-01-30 11:04:39 +01:00
payment-methods Fix saved payment method selection not working for purchases. (https://github.com/woocommerce/woocommerce-blocks/pull/2425) 2020-05-11 09:29:57 -04:00
price-slider Basic storybook implementation (https://github.com/woocommerce/woocommerce-blocks/pull/1636) 2020-01-31 09:59:14 +13:00
product-list Cart & Checkout: Update styles to better match designs (https://github.com/woocommerce/woocommerce-blocks/pull/2283) 2020-04-24 13:23:25 +01:00
product-list-item Fix blocks not being added in WP <= 5.2 (https://github.com/woocommerce/woocommerce-blocks/pull/2001) 2020-03-26 13:39:54 +01:00
product-sort-select Update dependencies order (https://github.com/woocommerce/woocommerce-blocks/pull/1146) 2019-11-08 17:30:11 +01:00
quantity-selector Cart & Checkout: Update styles to better match designs (https://github.com/woocommerce/woocommerce-blocks/pull/2283) 2020-04-24 13:23:25 +01:00
radio-control Fix saved payment method selection not working for purchases. (https://github.com/woocommerce/woocommerce-blocks/pull/2425) 2020-05-11 09:29:57 -04:00
read-more Basic storybook implementation (https://github.com/woocommerce/woocommerce-blocks/pull/1636) 2020-01-31 09:59:14 +13:00
reviews Migrate REST API usage to the Store API (https://github.com/woocommerce/woocommerce-blocks/pull/2282) 2020-04-24 14:36:47 +01:00
select SCSS mixins cleanup (https://github.com/woocommerce/woocommerce-blocks/pull/2405) 2020-05-07 10:48:38 +02:00
sidebar-layout Use container queries to load Cart and Checkout responsive styles (https://github.com/woocommerce/woocommerce-blocks/pull/2370) 2020-05-05 10:10:02 +02:00
sort-select Fix blocks not being added in WP <= 5.2 (https://github.com/woocommerce/woocommerce-blocks/pull/2001) 2020-03-26 13:39:54 +01:00
state-input Store billing address to local state and persist globally to prevent loss of data (https://github.com/woocommerce/woocommerce-blocks/pull/2374) 2020-05-06 11:21:30 +01:00
store-notices-container Fix Cart block interaction in the editor (mobile) (https://github.com/woocommerce/woocommerce-blocks/pull/2354) 2020-04-29 17:45:29 +02:00
summary Remove API summaries in favour of client side code (https://github.com/woocommerce/woocommerce-blocks/pull/2387) 2020-05-06 11:30:15 +01:00
tabs Update payment method config to include icons (https://github.com/woocommerce/woocommerce-blocks/pull/2267) 2020-04-29 11:57:58 +01:00
text-input SCSS mixins cleanup (https://github.com/woocommerce/woocommerce-blocks/pull/2405) 2020-05-07 10:48:38 +02:00
validation SCSS mixins cleanup (https://github.com/woocommerce/woocommerce-blocks/pull/2405) 2020-05-07 10:48:38 +02:00