From 2b13adffa06c3d4b6f43380cb0dc6590017c5b38 Mon Sep 17 00:00:00 2001 From: Kendrick Chan Date: Sun, 21 Jun 2020 17:04:41 +0800 Subject: [PATCH] Add customer email to jo details in rider api #424 --- src/Service/RiderAPIHandler/CMBRiderAPIHandler.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Service/RiderAPIHandler/CMBRiderAPIHandler.php b/src/Service/RiderAPIHandler/CMBRiderAPIHandler.php index c76d88b5..2755a804 100644 --- a/src/Service/RiderAPIHandler/CMBRiderAPIHandler.php +++ b/src/Service/RiderAPIHandler/CMBRiderAPIHandler.php @@ -707,6 +707,12 @@ class CMBRiderAPIHandler implements RiderAPIHandlerInterface $after_images['others'] = $other_images; } + // customer email + if ($jo->getMeta('customer_email') == null) + $cust_email = ''; + else + $cust_email = $jo->getMeta('customer_email'); + $data = [ 'id' => $jo->getID(), 'service_type' => $jo->getServiceType(), @@ -758,6 +764,9 @@ class CMBRiderAPIHandler implements RiderAPIHandlerInterface 'arrive_photos' => $before_images, 'finish_photos' => $after_images, + // customer email + 'customer_email' => $cust_email, + // END: cmb speicifc details ];