Skip to content

Commit

Permalink
Allow the 'forceNetworkSavedCards' payment method setting to be overr…
Browse files Browse the repository at this point in the history
…idden

Allow the network saved card setting to be overriden by the `wcpay_force_network_saved_cards` filter
  • Loading branch information
romarioraffington committed Sep 18, 2024
1 parent 682cdd7 commit 5b932ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/class-wc-payments-checkout.php
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ public function get_enabled_payment_method_config() {
'number' => '<button type="button" class="js-woopayments-copy-test-number" aria-label="' . esc_attr( __( 'Click to copy the test number to clipboard', 'woocommerce-payments' ) ) . '" title="' . esc_attr( __( 'Copy to clipboard', 'woocommerce-payments' ) ) . '"><i></i><span>',
]
);
$settings[ $payment_method_id ]['forceNetworkSavedCards'] = $gateway_for_payment_method->should_use_stripe_platform_on_checkout_page();
$settings[ $payment_method_id ]['forceNetworkSavedCards'] = WC_Payments::is_network_saved_cards_enabled() || $gateway_for_payment_method->should_use_stripe_platform_on_checkout_page();
}

return $settings;
Expand Down

0 comments on commit 5b932ff

Please sign in to comment.