@@ -313,8 +313,9 @@ private extension OrderDetailsViewController {
313313
314314 cell. textLabel? . text = email
315315 cell. accessoryImageView. image = Gridicon . iconOfType ( . mail)
316- cell. onTouchUp = { [ weak self] in
317- self ? . emailButtonAction ( )
316+ cell. onTouchUp = { [ weak self] _ in
317+ WooAnalytics . shared. track ( . orderDetailCustomerEmailTapped)
318+ self ? . displayEmailComposerIfPossible ( )
318319 }
319320
320321 cell. isAccessibilityElement = true
@@ -674,18 +675,18 @@ extension OrderDetailsViewController: MFMessageComposeViewControllerDelegate {
674675// MARK: - MFMailComposeViewControllerDelegate Conformance
675676//
676677extension OrderDetailsViewController : MFMailComposeViewControllerDelegate {
677- func sendEmailIfPossible ( ) {
678+ func displayEmailComposerIfPossible ( ) {
678679 guard let email = viewModel. order. billingAddress? . email, MFMailComposeViewController . canSendMail ( ) else {
679680 return
680681 }
681682
682- sendEmail ( to : email)
683+ displayEmailComposer ( for : email)
683684 WooAnalytics . shared. track ( . orderContactAction, withProperties: [ " id " : viewModel. order. orderID,
684685 " status " : viewModel. order. status. rawValue,
685686 " type " : " email " ] )
686687 }
687688
688- private func sendEmail ( to email: String ) {
689+ private func displayEmailComposer ( for email: String ) {
689690 // Workaround: MFMailCompose isn't *FULLY* picking up UINavigationBar's WC's appearance. Title / Buttons look awful.
690691 // We're falling back to iOS's default appearance
691692 UINavigationBar . applyDefaultAppearance ( )
0 commit comments