diff --git a/includes/class-wc-ajax.php b/includes/class-wc-ajax.php index 7c89d0e7ef9..440d2d707da 100644 --- a/includes/class-wc-ajax.php +++ b/includes/class-wc-ajax.php @@ -729,6 +729,10 @@ class WC_AJAX { wc_deprecated_function( 'The woocommerce_found_customer_details filter', '2.7', 'woocommerce_found_customer_details' ); } + $data = $customer->get_data(); + $data['date_created'] = $data['date_created'] ? $data['date_created']->getTimestamp() : null; + $data['date_modified'] = $data['date_modified'] ? $data['date_modified']->getTimestamp() : null; + $customer_data = apply_filters( 'woocommerce_ajax_get_customer_details', $customer->get_data(), $customer, $user_id ); wp_send_json( $customer_data ); }