From 2877752e1f4e2425c00dd5dfa4ff7a2dd0256ebe Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Thu, 6 Apr 2017 20:18:14 +0100 Subject: [PATCH] array_flip --- includes/data-stores/class-wc-customer-data-store.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/includes/data-stores/class-wc-customer-data-store.php b/includes/data-stores/class-wc-customer-data-store.php index 78a90c66d9c..377cf2b6b58 100644 --- a/includes/data-stores/class-wc-customer-data-store.php +++ b/includes/data-stores/class-wc-customer-data-store.php @@ -133,14 +133,7 @@ class WC_Customer_Data_Store extends WC_Data_Store_WP implements WC_Customer_Dat $customer_id = $customer->get_id(); // Load meta but exclude deprecated props. - $user_meta = array_diff_key( array_map( 'wc_flatten_meta_callback', get_user_meta( $customer_id ) ), array( - 'country' => 1, - 'state' => 1, - 'postcode' => 1, - 'city' => 1, - 'address' => 1, - 'address_2' => 1, - ) ); + $user_meta = array_diff_key( array_map( 'wc_flatten_meta_callback', get_user_meta( $customer_id ) ), array_flip( array( 'country', 'state', 'postcode', 'city', 'address', 'address_2', 'default' ) ) ); $customer->set_props( $user_meta ); $customer->set_props( array( 'is_paying_customer' => get_user_meta( $customer_id, 'paying_customer', true ),