From 345f63fca89a49e84c6642cdbca38d3e7d9a47a1 Mon Sep 17 00:00:00 2001 From: Guilherme Pressutto Date: Mon, 25 Mar 2024 21:43:52 -0300 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Samir Merchant --- includes/class-wc-payments-utils.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/class-wc-payments-utils.php b/includes/class-wc-payments-utils.php index 020c155dc9a..8b58715df8b 100644 --- a/includes/class-wc-payments-utils.php +++ b/includes/class-wc-payments-utils.php @@ -346,7 +346,7 @@ public static function map_search_orders_to_charge_ids( $search ) { * @return array */ public static function get_billing_details_from_order( $order ) { - $billing_fields = array_keys( wc()->checkout()->get_checkout_fields( 'billing' ) ); + $billing_fields = array_keys( WC()->checkout()->get_checkout_fields( 'billing' ) ); $address_field_to_key = [ 'billing_city' => 'city', 'billing_country' => 'country', @@ -372,7 +372,7 @@ public static function get_billing_details_from_order( $order ) { $billing_details['name'] = trim( $order->get_formatted_billing_full_name() ); } - return array_filter( $billing_details ); + return $billing_details; } /**