From 34146c3c389a7cc523af6df20737e90f7a28f822 Mon Sep 17 00:00:00 2001 From: Thomas Roberts <5656702+opr@users.noreply.github.com> Date: Mon, 9 Jan 2023 23:01:49 +0000 Subject: [PATCH] Add thunk support for < WP 5.9 (#8136) --- assets/js/data/cart/index.ts | 1 + assets/js/data/checkout/index.ts | 1 + assets/js/data/payment/index.ts | 1 + 3 files changed, 3 insertions(+) diff --git a/assets/js/data/cart/index.ts b/assets/js/data/cart/index.ts index 47ba38793ae..5ddd7de7793 100644 --- a/assets/js/data/cart/index.ts +++ b/assets/js/data/cart/index.ts @@ -29,6 +29,7 @@ const registeredStore = registerStore< State >( STORE_KEY, { controls: dataControls, selectors, resolvers, + __experimentalUseThunks: true, } ); registeredStore.subscribe( pushChanges ); diff --git a/assets/js/data/checkout/index.ts b/assets/js/data/checkout/index.ts index cd26412a047..267bcd78b94 100644 --- a/assets/js/data/checkout/index.ts +++ b/assets/js/data/checkout/index.ts @@ -16,6 +16,7 @@ export const config = { reducer, selectors, actions, + __experimentalUseThunks: true, }; const store = createReduxStore( STORE_KEY, config ); diff --git a/assets/js/data/payment/index.ts b/assets/js/data/payment/index.ts index 9d7820d15b4..2e3abf8d45a 100644 --- a/assets/js/data/payment/index.ts +++ b/assets/js/data/payment/index.ts @@ -20,6 +20,7 @@ export const config = { actions, // eslint-disable-next-line @typescript-eslint/no-explicit-any controls: { ...dataControls, ...sharedControls } as any, + __experimentalUseThunks: true, }; const store = createReduxStore( STORE_KEY, config );