From edff9a19d077bad07ef85cb4e5044b5422aac4fa Mon Sep 17 00:00:00 2001 From: Thomas Roberts Date: Thu, 2 Feb 2023 16:36:34 +0000 Subject: [PATCH] Switch order of array_unique and array_values --- src/Shipping/ShippingController.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Shipping/ShippingController.php b/src/Shipping/ShippingController.php index 704ee679101..9b8494a3a56 100644 --- a/src/Shipping/ShippingController.php +++ b/src/Shipping/ShippingController.php @@ -78,10 +78,10 @@ function( $methods, $method ) { array() ); - // This array_unique is necessary because WC()->shipping()->get_shipping_methods() can return duplicates. - return array_unique( - // We use array_values because this will be used in JS, so we don't need the (numerical) keys. - array_values( + // We use array_values because this will be used in JS, so we don't need the (numerical) keys. + return array_values( + // This array_unique is necessary because WC()->shipping()->get_shipping_methods() can return duplicates. + array_unique( $all_methods_supporting_local_pickup ) );