From 7b5d0e86aabdf2f7c5c40b15cc2efb79ee36dce5 Mon Sep 17 00:00:00 2001 From: nbloomf Date: Mon, 16 Dec 2024 13:48:34 -0600 Subject: [PATCH] Misc lint fixes --- includes/class-wc-stripe-helper.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/includes/class-wc-stripe-helper.php b/includes/class-wc-stripe-helper.php index 651cc8e92..6c6c72cdb 100644 --- a/includes/class-wc-stripe-helper.php +++ b/includes/class-wc-stripe-helper.php @@ -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 { @@ -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 @@ -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 ) { @@ -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 ) { @@ -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 ); } );