Skip to content

Commit

Permalink
Misc lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nbloomf committed Dec 16, 2024
1 parent ff9e954 commit 7b5d0e8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions includes/class-wc-stripe-helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ public static function get_legacy_available_payment_method_ids() {
// If the legacy method order is not set, return the default order.
if ( ! empty( $ordered_payment_method_ids ) ) {
$payment_method_ids = array_map(
function( $payment_method_id ) {
function ( $payment_method_id ) {
if ( 'stripe' === $payment_method_id ) {
return WC_Stripe_Payment_Methods::CARD;
} else {
Expand All @@ -517,7 +517,7 @@ function( $payment_method_id ) {
}
} else {
$payment_method_ids = array_map(
function( $payment_method_class ) {
function ( $payment_method_class ) {
return str_replace( 'stripe_', '', $payment_method_class::ID );
},
$payment_method_classes
Expand Down Expand Up @@ -616,6 +616,7 @@ public static function get_legacy_individual_payment_method_settings() {
* @return array
*/
public static function get_upe_individual_payment_method_settings( $gateway ) {
$payment_method_settings = [];
$available_gateways = $gateway->get_upe_available_payment_methods();

foreach ( $available_gateways as $gateway ) {
Expand Down Expand Up @@ -672,7 +673,7 @@ public static function get_upe_ordered_payment_method_ids( $gateway ) {
// When switched to the new checkout experience, the UPE method order is not set. Copy the legacy order to the UPE order to persist previous settings.
if ( empty( $stripe_settings['stripe_upe_payment_method_order'] ) && ! empty( $stripe_settings['stripe_legacy_method_order'] ) ) {
$ordered_payment_method_ids = array_map(
function( $payment_method_id ) {
function ( $payment_method_id ) {
if ( 'stripe' === $payment_method_id ) {
return WC_Stripe_Payment_Methods::CARD;
} elseif ( 'stripe_sepa' === $payment_method_id ) {
Expand All @@ -692,7 +693,7 @@ function( $payment_method_id ) {

$ordered_payment_method_ids_with_capability = array_filter(
$ordered_payment_method_ids,
function( $payment_method_id ) use ( $available_methods_with_capability ) {
function ( $payment_method_id ) use ( $available_methods_with_capability ) {
return in_array( $payment_method_id, $available_methods_with_capability, true );
}
);
Expand Down

0 comments on commit 7b5d0e8

Please sign in to comment.