woocommerce/plugins/woocommerce-blocks/assets/js
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
..
atomic 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
base 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
blocks fix broken cart styles in Editor (https://github.com/woocommerce/woocommerce-blocks/pull/2448) 2020-05-11 13:12:47 +01:00
blocks-registry Payment methods `placeOrderButtonLabel` config (https://github.com/woocommerce/woocommerce-blocks/pull/2362) 2020-04-30 10:52:36 +01:00
components SCSS mixins cleanup (https://github.com/woocommerce/woocommerce-blocks/pull/2405) 2020-05-07 10:48:38 +02:00
data 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
filters 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
hocs Migrate REST API usage to the Store API (https://github.com/woocommerce/woocommerce-blocks/pull/2282) 2020-04-24 14:36:47 +01:00
icons Show feedback on buttons/checkout when processing (https://github.com/woocommerce/woocommerce-blocks/pull/2186) 2020-04-15 17:09:15 +01:00
legacy 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
middleware Fix X-WC-Store-API-Nonce updates (https://github.com/woocommerce/woocommerce-blocks/pull/2429) 2020-05-08 10:39:03 -04:00
payment-method-extensions/payment-methods Fixes regression with payment method validation (https://github.com/woocommerce/woocommerce-blocks/pull/2450) 2020-05-10 19:41:10 -04:00
previews Fixes regression with payment method validation (https://github.com/woocommerce/woocommerce-blocks/pull/2450) 2020-05-10 19:41:10 -04:00
settings Fix X-WC-Store-API-Nonce updates (https://github.com/woocommerce/woocommerce-blocks/pull/2429) 2020-05-08 10:39:03 -04:00
type-defs Fixes regression with payment method validation (https://github.com/woocommerce/woocommerce-blocks/pull/2450) 2020-05-10 19:41:10 -04:00
utils Inject block attributes rather than save them (https://github.com/woocommerce/woocommerce-blocks/pull/2273) 2020-04-27 12:06:58 -04:00
index.js Give Woo Icon special treatment by making it a component (https://github.com/woocommerce/woocommerce-blocks/pull/1702) 2020-02-10 14:24:02 +01:00