Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Add thunk support for < WP 5.9 (#8136)
Browse files Browse the repository at this point in the history
  • Loading branch information
opr authored Jan 9, 2023
1 parent dfd2902 commit 34146c3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions assets/js/data/cart/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const registeredStore = registerStore< State >( STORE_KEY, {
controls: dataControls,
selectors,
resolvers,
__experimentalUseThunks: true,
} );

registeredStore.subscribe( pushChanges );
Expand Down
1 change: 1 addition & 0 deletions assets/js/data/checkout/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export const config = {
reducer,
selectors,
actions,
__experimentalUseThunks: true,
};

const store = createReduxStore( STORE_KEY, config );
Expand Down
1 change: 1 addition & 0 deletions assets/js/data/payment/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down

0 comments on commit 34146c3

Please sign in to comment.