From 486f7cc7381f0c270533d44a132d5adc80137a40 Mon Sep 17 00:00:00 2001 From: Justin Shreve Date: Tue, 9 Aug 2016 14:02:58 -0700 Subject: [PATCH] Correct the avatar_url Customer API response to use the correct email field. --- includes/api/class-wc-rest-customers-controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/api/class-wc-rest-customers-controller.php b/includes/api/class-wc-rest-customers-controller.php index c9ab929ac8e..40e418be3ee 100644 --- a/includes/api/class-wc-rest-customers-controller.php +++ b/includes/api/class-wc-rest-customers-controller.php @@ -489,7 +489,7 @@ class WC_REST_Customers_Controller extends WC_REST_Controller { ), 'orders_count' => wc_get_customer_order_count( $customer->ID ), 'total_spent' => wc_format_decimal( wc_get_customer_total_spent( $customer->ID ), 2 ), - 'avatar_url' => wc_get_customer_avatar_url( $customer->customer_email ), + 'avatar_url' => wc_get_customer_avatar_url( $customer->user_email ), 'billing' => array( 'first_name' => $customer->billing_first_name, 'last_name' => $customer->billing_last_name,