diff --git a/plugins/woocommerce-blocks/assets/js/base/context/providers/cart-checkout/checkout-processor.js b/plugins/woocommerce-blocks/assets/js/base/context/providers/cart-checkout/checkout-processor.js index ce23a3e56e1..20c54003b45 100644 --- a/plugins/woocommerce-blocks/assets/js/base/context/providers/cart-checkout/checkout-processor.js +++ b/plugins/woocommerce-blocks/assets/js/base/context/providers/cart-checkout/checkout-processor.js @@ -86,7 +86,7 @@ const CheckoutProcessor = () => { paymentMethodData: store.getPaymentMethodData(), isExpressPaymentMethodActive: store.isExpressPaymentMethodActive(), currentPaymentStatus: store.getCurrentStatus(), - shouldSavePayment: store.shouldSavePaymentMethod(), + shouldSavePayment: store.getShouldSavePaymentMethod(), }; }, [] ); diff --git a/plugins/woocommerce-blocks/assets/js/blocks/cart-checkout-shared/payment-methods/payment-method-card.js b/plugins/woocommerce-blocks/assets/js/blocks/cart-checkout-shared/payment-methods/payment-method-card.js index a70a7f5b9e0..84ff98362b1 100644 --- a/plugins/woocommerce-blocks/assets/js/blocks/cart-checkout-shared/payment-methods/payment-method-card.js +++ b/plugins/woocommerce-blocks/assets/js/blocks/cart-checkout-shared/payment-methods/payment-method-card.js @@ -30,7 +30,7 @@ const PaymentMethodCard = ( { children, showSaveOption } ) => { const checkoutStore = select( CHECKOUT_STORE_KEY ); return { shouldSavePaymentMethod: - paymentMethodStore.shouldSavePaymentMethod(), + paymentMethodStore.getShouldSavePaymentMethod(), customerId: checkoutStore.getCustomerId(), }; } ); diff --git a/plugins/woocommerce-blocks/assets/js/data/payment/selectors.ts b/plugins/woocommerce-blocks/assets/js/data/payment/selectors.ts index e393285899f..2f36a8b714d 100644 --- a/plugins/woocommerce-blocks/assets/js/data/payment/selectors.ts +++ b/plugins/woocommerce-blocks/assets/js/data/payment/selectors.ts @@ -63,10 +63,6 @@ export const getActiveSavedPaymentMethods = ( ); }; -export const shouldSavePaymentMethod = ( state: PaymentMethodDataState ) => { - return state.shouldSavePaymentMethod; -}; - export const paymentMethodsInitialized = ( state: PaymentMethodDataState ) => { return state.paymentMethodsInitialized; };