woocommerce/plugins/woocommerce-blocks/assets/js/base/components/radio-control
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
..
_mixin.scss Cart & Checkout: Update styles to better match designs (https://github.com/woocommerce/woocommerce-blocks/pull/2283) 2020-04-24 13:23:25 +01:00
editor.scss Make Shipping packages collapsible in Cart page (https://github.com/woocommerce/woocommerce-blocks/pull/1867) 2020-03-09 12:28:26 +01:00
index.js 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
option-layout.js Hook up shipping methods to API (https://github.com/woocommerce/woocommerce-blocks/pull/1468) 2020-02-14 04:43:13 +01:00
option.js Hook up shipping methods to API (https://github.com/woocommerce/woocommerce-blocks/pull/1468) 2020-02-14 04:43:13 +01:00
style.scss Make Shipping packages collapsible in Cart page (https://github.com/woocommerce/woocommerce-blocks/pull/1867) 2020-03-09 12:28:26 +01:00