mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-04 08:47:23 +08:00
✨ New Redux prop for disabled credit cards
This commit is contained in:
parent
d24adbfe2f
commit
6a36951159
2 changed files with 9 additions and 0 deletions
|
@ -40,6 +40,8 @@ const useHooks = () => {
|
|||
const [ landingPage, setLandingPage ] = usePersistent( 'landingPage' );
|
||||
const [ buttonLanguage, setButtonLanguage ] =
|
||||
usePersistent( 'buttonLanguage' );
|
||||
const [ disabledCards, setDisabledCards ] =
|
||||
usePersistent( 'disabledCards' );
|
||||
|
||||
return {
|
||||
persist,
|
||||
|
@ -68,6 +70,8 @@ const useHooks = () => {
|
|||
setLandingPage,
|
||||
buttonLanguage,
|
||||
setButtonLanguage,
|
||||
disabledCards,
|
||||
setDisabledCards,
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -102,6 +106,8 @@ export const useSettings = () => {
|
|||
setLandingPage,
|
||||
buttonLanguage,
|
||||
setButtonLanguage,
|
||||
disabledCards,
|
||||
setDisabledCards,
|
||||
} = useHooks();
|
||||
|
||||
return {
|
||||
|
@ -129,5 +135,7 @@ export const useSettings = () => {
|
|||
setLandingPage,
|
||||
buttonLanguage,
|
||||
setButtonLanguage,
|
||||
disabledCards,
|
||||
setDisabledCards,
|
||||
};
|
||||
};
|
||||
|
|
|
@ -45,6 +45,7 @@ const defaultPersistent = Object.freeze( {
|
|||
sandboxClientId: '', // Sandbox API client ID
|
||||
sandboxSecretKey: '', // Sandbox API secret key
|
||||
sandboxConnected: false, // Sandbox connection status
|
||||
disabledCards: [], // Disabled credit card types
|
||||
} );
|
||||
|
||||
// Reducer logic.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue