From 6021ef6db2c47bd56f69f2bcf40432294260e66f Mon Sep 17 00:00:00 2001 From: Philipp Stracker
{ __( 'Click the button below to be guided through connecting your existing PayPal account or creating a new one. You will be able to choose the payment options that are right for your store.', diff --git a/modules/ppcp-settings/resources/js/Components/Screens/Onboarding/hooks/usePaymentConfig.js b/modules/ppcp-settings/resources/js/Components/Screens/Onboarding/hooks/usePaymentConfig.js index b4524fd0c..e14b0f21c 100644 --- a/modules/ppcp-settings/resources/js/Components/Screens/Onboarding/hooks/usePaymentConfig.js +++ b/modules/ppcp-settings/resources/js/Components/Screens/Onboarding/hooks/usePaymentConfig.js @@ -131,14 +131,14 @@ const filterMethods = ( methods, conditions ) => { ); }; -export const usePaymentConfig = ( country, useAcdc, isFastlane ) => { +export const usePaymentConfig = ( country, canUseCardPayments, isFastlane ) => { return useMemo( () => { const countryConfig = countrySpecificConfigs[ country ] || {}; const config = { ...defaultConfig, ...countryConfig }; const learnMoreConfig = learnMoreLinks[ country ] || {}; // Determine the "right side" items: Either BCDC or ACDC items. - const optionalMethods = useAcdc + const optionalMethods = canUseCardPayments ? config.extendedMethods : config.basicMethods; @@ -151,8 +151,7 @@ export const usePaymentConfig = ( country, useAcdc, isFastlane ) => { ...config, optionalMethods: availableOptionalMethods, learnMoreConfig, - acdcIcons: config.acdcIcons, - bcdcIcons: config.bcdcIcons, + icons: canUseCardPayments ? config.acdcIcons : config.bcdcIcons, }; - }, [ country, useAcdc, isFastlane ] ); + }, [ country, canUseCardPayments, isFastlane ] ); };