From 6272372fe881021bc298cdac8f891d53ebf7e23b Mon Sep 17 00:00:00 2001 From: magepeopleteam Date: Fri, 23 Feb 2024 02:52:44 +0000 Subject: [PATCH] event confirmation email sent issue --- inc/mep_functions.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inc/mep_functions.php b/inc/mep_functions.php index e0832da..454a66b 100755 --- a/inc/mep_functions.php +++ b/inc/mep_functions.php @@ -1004,7 +1004,7 @@ if (!function_exists('mep_attendee_status_update')) { // Getting an instance of the order object $order = wc_get_order($order_id); $order_meta = get_post_meta($order_id); - $email = isset($order_meta['_billing_email'][0]) ? $order_meta['_billing_email'][0] : array(); + $email = isset($order_meta['_billing_email'][0]) ? $order_meta['_billing_email'][0] : $order->get_billing_email(); $email_send_status = mep_get_option('mep_email_sending_order_status', 'email_setting_sec', array('disable_email' => 'disable_email')); $email_send_status = !empty($email_send_status) ? $email_send_status : array('disable_email' => 'disable_email'); $enable_billing_email = mep_get_option('mep_send_confirmation_to_billing_email', 'email_setting_sec','enable'); @@ -1066,6 +1066,7 @@ if (!function_exists('mep_attendee_status_update')) { change_extra_service_status($order_id, 'publish', 'trash', 'completed'); change_extra_service_status($order_id, 'publish', 'publish', 'completed'); do_action('mep_wc_order_status_change', $order_status, $event_id, $order_id); + if (in_array('completed', $email_send_status)) { mep_event_confirmation_email_sent($event_id, $email, $order_id);